diff --git a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php index df67455..3f40fc8 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php @@ -171,14 +171,13 @@ function render_item($count, $item) { protected function documentSelfTokens(&$tokens) { $tokens['{{ ' . $this->options['id'] . '__tid' . ' }}'] = $this->t('The taxonomy term ID for the term.'); $tokens['{{ ' . $this->options['id'] . '__name' . ' }}'] = $this->t('The taxonomy term name for the term.'); - $tokens['{{ ' . $this->options['id'] . '__vocabulary-vid' . ' }}'] = $this->t('The machine name for the vocabulary the term belongs to.'); + $tokens['{{ ' . $this->options['id'] . '__vocabulary_vid' . ' }}'] = $this->t('The machine name for the vocabulary the term belongs to.'); $tokens['{{ ' . $this->options['id'] . '__vocabulary' . ' }}'] = $this->t('The name for the vocabulary the term belongs to.'); } protected function addSelfTokens(&$tokens, $item) { foreach (array('tid', 'name', 'vocabulary_vid', 'vocabulary') as $token) { - // Replace _ with - for the vocabulary vid. - $tokens['{{ ' . $this->options['id'] . '__' . str_replace('_', '-', $token) . ' }}'] = isset($item[$token]) ? $item[$token] : ''; + $tokens['{{ ' . $this->options['id'] . '__' . $token . ' }}'] = isset($item[$token]) ? $item[$token] : ''; } }