Pass the entity into the build context

Created on 6 February 2023, almost 2 years ago
Updated 21 February 2023, over 1 year ago

Problem/Motivation

Tokens are not replaced in the url setting of the button pattern.

In app/modules/contrib/ui_patterns_settings/src/Element/PatternSettings.php::processSettings():

$entity = $context->getProperty('entity');

But in app/modules/contrib/ui_patterns_entity_links/src/Plugin/Block/LinkBlock.php:

    $build['#context'] = [
      'type' => 'entity_link',
      'entity_type' => $this->getEntity()->getEntityTypeId(),
      'entity_id' => $this->getEntity()->id(),
      'link' => $rel,
    ];

The entity is not passed into the build context.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France Grimreaper France 🇫🇷

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024