From b944a7fcd3d44748a33d4371c1801df47c8f0912 Mon Sep 17 00:00:00 2001 From: Erik Seifert Date: Mon, 28 Oct 2019 14:08:25 +0100 Subject: [PATCH] Fix: correct not existing build variable --- modules/ui_patterns_layouts/ui_patterns_layouts.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_patterns_layouts/ui_patterns_layouts.module b/modules/ui_patterns_layouts/ui_patterns_layouts.module index 9aa74e55..cc70e5b2 100644 --- a/modules/ui_patterns_layouts/ui_patterns_layouts.module +++ b/modules/ui_patterns_layouts/ui_patterns_layouts.module @@ -62,7 +62,7 @@ function ui_patterns_layouts_preprocess_ds_entity_view(&$variables) { function ui_patterns_layouts_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { if ($display instanceof EntityDisplayWithLayoutInterface && isset($build['_field_layout']['#type']) && $build['_field_layout']['#type'] == 'pattern') { $build['_field_layout']['#context']['type'] = 'layout'; - $build['_field_layout']['#context']['entity_type'] = $build['#entity_type']; + $build['_field_layout']['#context']['entity_type'] = $entity->getEntityTypeId(); $build['_field_layout']['#context']['bundle'] = $entity->bundle(); $build['_field_layout']['#context']['view_mode'] = $build['#view_mode']; $build['_field_layout']['#context']['entity_id'] = $entity->id();