Skip to content
Snippets Groups Projects

Issue #2985364: Is there any way to pass the token from the current paragraph to the view?

Open Issue #2985364: Is there any way to pass the token from the current paragraph to the view?
1 unresolved thread
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
84 $parent_entity_id = $view->element['#viewsreference']['parent_entity_id'];
85 $parent_entity = \Drupal::entityTypeManager()
86 ->getStorage($parent_entity_type)
87 ->load($parent_entity_id);
88 $parent_entity = \Drupal::service('entity.repository')
89 ->getTranslationFromContext($parent_entity);
90 $replacements[$parent_entity_type] = $parent_entity;
91 }
92 elseif (isset($view->element['#viewsreference']['entity'])
93 && $view->element['#viewsreference']['entity'] instanceof EntityInterface) {
94 $replacements[$view->element['#viewsreference']['entity']
95 ->getEntityTypeId()] = $view->element['#viewsreference']['entity'];
96 }
97 else {
98 $node = \Drupal::routeMatch()->getParameter('node');
99 $replacements['node'] = $node;
Please register or sign in to reply
Loading