You are here

public function TokensReplacementEvent::getBubbleableMetadata in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/src/Event/Token/TokensReplacementEvent.php \Drupal\core_event_dispatcher\Event\Token\TokensReplacementEvent::getBubbleableMetadata()

Getter.

The bubbleable metadata. Prior to invoking this hook, \Drupal\Core\Utility\Token::generate() collects metadata for all of the data objects in $data. For any data sources not in $data, but that are used by the token replacement logic, such as global configuration (e.g., 'system.site') and related objects (e.g., $node->getOwner()), implementations of this hook must add the corresponding metadata. For example:

Return value

\Drupal\Core\Render\BubbleableMetadata The metadata.

File

modules/core_event_dispatcher/src/Event/Token/TokensReplacementEvent.php, line 187

Class

TokensReplacementEvent
Class TokensProvideEvent.

Namespace

Drupal\core_event_dispatcher\Event\Token

Code

public function getBubbleableMetadata() : BubbleableMetadata {
  return $this->bubbleableMetadata;
}