Loading src/Plugin/Block/LinkBlock.php +14 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,20 @@ class LinkBlock extends BlockBase implements ContextAwarePluginInterface, Contai $build['#variant'] = $variant; } // Add the settings. if (!empty($config['pattern_settings']) && !empty($config['pattern_settings'][$pattern])) { $settings = $config['pattern_settings'][$pattern]; $build['#settings'] = $settings; } // Add context. $build['#context'] = [ 'type' => 'entity_link', 'entity_type' => $this->getEntity()->getEntityTypeId(), 'entity_id' => $this->getEntity()->id(), 'link' => $rel, ]; return $build; } Loading ui_patterns_entity_links.info.yml +1 −2 Original line number Diff line number Diff line name: UI Patterns Entity Links type: module description: Expose entity links as Layout Builder blocks and display them with UI Patterns components. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: User interface dependencies: - ui_patterns:ui_patterns Loading
src/Plugin/Block/LinkBlock.php +14 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,20 @@ class LinkBlock extends BlockBase implements ContextAwarePluginInterface, Contai $build['#variant'] = $variant; } // Add the settings. if (!empty($config['pattern_settings']) && !empty($config['pattern_settings'][$pattern])) { $settings = $config['pattern_settings'][$pattern]; $build['#settings'] = $settings; } // Add context. $build['#context'] = [ 'type' => 'entity_link', 'entity_type' => $this->getEntity()->getEntityTypeId(), 'entity_id' => $this->getEntity()->id(), 'link' => $rel, ]; return $build; } Loading
ui_patterns_entity_links.info.yml +1 −2 Original line number Diff line number Diff line name: UI Patterns Entity Links type: module description: Expose entity links as Layout Builder blocks and display them with UI Patterns components. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: User interface dependencies: - ui_patterns:ui_patterns