From a1a08fb850597c1ff77d0e4e81bfae9b7020a58d Mon Sep 17 00:00:00 2001 From: David Stangl Date: Wed, 9 Mar 2022 16:07:52 +0100 Subject: [PATCH] feat(ui_patterns_views) add views row entity context to pattern --- modules/ui_patterns_views/ui_patterns_views.module | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui_patterns_views/ui_patterns_views.module b/modules/ui_patterns_views/ui_patterns_views.module index 0b2ad4c6..af302c36 100644 --- a/modules/ui_patterns_views/ui_patterns_views.module +++ b/modules/ui_patterns_views/ui_patterns_views.module @@ -65,6 +65,7 @@ function template_preprocess_pattern_views_row(array &$variables) { $variables['pattern']['#context']['display'] = $view->current_display; $variables['pattern']['#context']['view'] = $view; $variables['pattern']['#context']['row'] = $row; + $variables['pattern']['#context']['entity'] = isset($row->_object) ? $row->_object->getEntity() : NULL; } }