function PluginBase::globalTokenReplace

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::globalTokenReplace()
  2. 8.9.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::globalTokenReplace()
  3. 11.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::globalTokenReplace()

Overrides ViewsPluginInterface::globalTokenReplace

3 calls to PluginBase::globalTokenReplace()
TestExample::render in core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php
Render the area.
Title::preRender in core/modules/views/src/Plugin/views/area/Title.php
Performs any operations needed before full rendering.
TokenizeAreaPluginBase::tokenizeValue in core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php
Replaces value with special views tokens and global tokens.

File

core/modules/views/src/Plugin/views/PluginBase.php, line 342

Class

PluginBase
Base class for any views plugin types.

Namespace

Drupal\views\Plugin\views

Code

public function globalTokenReplace($string = '', array $options = []) {
    return \Drupal::token()->replace($string, [
        'view' => $this->view,
    ], $options);
}

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