public function TokensReplacementEvent::getData in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/core_event_dispatcher/src/Event/Token/TokensReplacementEvent.php \Drupal\core_event_dispatcher\Event\Token\TokensReplacementEvent::getData()
Getter for single data member.
Parameters
string $key: The key for the additional token data, like 'node'.
mixed $default: The default value, if data does not exists.
Return value
mixed The value.
File
- modules/
core_event_dispatcher/ src/ Event/ Token/ TokensReplacementEvent.php, line 142
Class
- TokensReplacementEvent
- Class TokensProvideEvent.
Namespace
Drupal\core_event_dispatcher\Event\TokenCode
public function getData(string $key, $default = NULL) {
return $this->data[$key] ?? $default;
}