diff --git a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php index 4fab01c..df67455 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php @@ -169,16 +169,16 @@ 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' . ']'] = $this->t('The name for the vocabulary the term belongs to.'); + $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' . ' }}'] = $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'] . '__' . str_replace('_', '-', $token) . ' }}'] = isset($item[$token]) ? $item[$token] : ''; } } diff --git a/core/modules/user/src/Plugin/views/field/Roles.php b/core/modules/user/src/Plugin/views/field/Roles.php index 403e9a4..00a1918 100644 --- a/core/modules/user/src/Plugin/views/field/Roles.php +++ b/core/modules/user/src/Plugin/views/field/Roles.php @@ -101,14 +101,14 @@ function render_item($count, $item) { } protected function documentSelfTokens(&$tokens) { - $tokens['[' . $this->options['id'] . '-role' . ']'] = $this->t('The name of the role.'); - $tokens['[' . $this->options['id'] . '-rid' . ']'] = $this->t('The role machine-name of the role.'); + $tokens['{{ ' . $this->options['id'] . '__role' . ' }}'] = $this->t('The name of the role.'); + $tokens['{{ ' . $this->options['id'] . '__rid' . ' }}'] = $this->t('The role machine-name of the role.'); } protected function addSelfTokens(&$tokens, $item) { if (!empty($item['role'])) { - $tokens['[' . $this->options['id'] . '-role' . ']'] = $item['role']; - $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid']; + $tokens['{{ ' . $this->options['id'] . '__role' . ' }}'] = $item['role']; + $tokens['{{ ' . $this->options['id'] . '__rid' . ' }}'] = $item['rid']; } }