protected function TaxonomyIndexTid::addSelfTokens in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid::addSelfTokens()
- 9 core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\field\TaxonomyIndexTid::addSelfTokens()
File
- core/
modules/ taxonomy/ src/ Plugin/ views/ field/ TaxonomyIndexTid.php, line 171
Class
- TaxonomyIndexTid
- Field handler to display all taxonomy terms of a node.
Namespace
Drupal\taxonomy\Plugin\views\fieldCode
protected function addSelfTokens(&$tokens, $item) {
foreach ([
'tid',
'name',
'vocabulary_vid',
'vocabulary',
] as $token) {
$tokens['{{ ' . $this->options['id'] . '__' . $token . ' }}'] = $item[$token] ?? '';
}
}