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

Breadcrumb

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

function EntityField::documentSelfTokens

Overrides FieldPluginBase::documentSelfTokens

File

core/modules/views/src/Plugin/views/field/EntityField.php, line 973

Class

EntityField
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

protected function documentSelfTokens(&$tokens) {
    $field = $this->getFieldDefinition();
    foreach ($field->getColumns() as $id => $column) {
        $tokens['{{ ' . $this->options['id'] . '__' . $id . ' }}'] = $this->t('Raw @column', [
            '@column' => $id,
        ]);
    }
}

API Navigation

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