function aet_tokens in Advanced Entity Tokens 2.x
Same name and namespace in other branches
- 7 aet.tokens.inc \aet_tokens()
Implements hook_tokens().
File
- ./
aet.module, line 68 - The AET main module file.
Code
function aet_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) {
if ($type !== 'aet') {
return [];
}
return \Drupal::service('aet.token_replacer')
->setOptions($options)
->setBubbleableMetadata($bubbleable_metadata)
->getReplacements($tokens);
}