function TokenizeAreaPluginBase::tokenizeValue

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php \Drupal\views\Plugin\views\area\TokenizeAreaPluginBase::tokenizeValue()
  2. 10 core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php \Drupal\views\Plugin\views\area\TokenizeAreaPluginBase::tokenizeValue()
  3. 11.x core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php \Drupal\views\Plugin\views\area\TokenizeAreaPluginBase::tokenizeValue()

Replaces value with special views tokens and global tokens.

Parameters

string $value: The value to eventually tokenize.

Return value

string Tokenized value if tokenize option is enabled. In any case global tokens will be replaced.

3 calls to TokenizeAreaPluginBase::tokenizeValue()
Entity::render in core/modules/views/src/Plugin/views/area/Entity.php
Render the area.
Text::render in core/modules/views/src/Plugin/views/area/Text.php
Render the area.
TextCustom::renderTextarea in core/modules/views/src/Plugin/views/area/TextCustom.php
Render a text area with \Drupal\Component\Utility\Xss::filterAdmin().

File

core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php, line 109

Class

TokenizeAreaPluginBase
Tokenized base class for area handlers.

Namespace

Drupal\views\Plugin\views\area

Code

public function tokenizeValue($value) {
    if ($this->options['tokenize']) {
        $value = $this->view
            ->getStyle()
            ->tokenizeValue($value, 0);
    }
    // As we add the globalTokenForm() we also should replace the token here.
    return $this->globalTokenReplace($value);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.