Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Roles.php

function Roles::documentSelfTokens

Overrides FieldPluginBase::documentSelfTokens

File

core/modules/user/src/Plugin/views/field/Roles.php, line 98

Class

Roles
Field handler to provide a list of roles.

Namespace

Drupal\user\Plugin\views\field

Code

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.');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal