Last active
June 3, 2019 10:27
-
-
Save zanvidmar/29d793fd5270df731615b3fc5fa007f5 to your computer and use it in GitHub Desktop.
Deprecated (moved to BB)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
| index 6619c58..9e1fe5b 100644 | |
| --- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
| +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php | |
| @@ -300,6 +300,10 @@ protected function buildSections(FieldableEntityInterface $entity) { | |
| if ($storage) { | |
| foreach ($storage->getSections() as $delta => $section) { | |
| $build[$delta] = $section->toRenderArray($contexts); | |
| + $build[$delta]['#view_mode'] = $this->getOriginalMode(); | |
| + $build[$delta]['#bundle'] = $this->getTargetBundle(); | |
| + $build[$delta]['#entity_type'] = $this->getTargetEntityTypeId(); | |
| + $build[$delta]['#entity_id'] = $entity->id(); | |
| } | |
| } | |
| // The render array is built based on decisions made by @SectionStorage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment