public function TokensInfoEvent::addToken in Hook Event Dispatcher 8
Add token.
Parameters
\Drupal\hook_event_dispatcher\Value\Token $type: The token.
File
- src/
Event/ Token/ TokensInfoEvent.php, line 51
Class
- TokensInfoEvent
- Class TokensInfoEvent.
Namespace
Drupal\hook_event_dispatcher\Event\TokenCode
public function addToken(Token $type) {
$this->tokens[$type
->getType()][$type
->getToken()] = [
'name' => $type
->getName(),
'description' => $type
->getDescription(),
'dynamic' => $type
->isDynamic(),
];
}