function Title::preRender

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

Overrides AreaPluginBase::preRender

File

core/modules/views/src/Plugin/views/area/Title.php, line 45

Class

Title
Views area title override handler.

Namespace

Drupal\views\Plugin\views\area

Code

public function preRender(array $results) {
    parent::preRender($results);
    // If a title is provided, process it.
    if (!empty($this->options['title'])) {
        $value = $this->globalTokenReplace($this->options['title']);
        $this->view
            ->setTitle($this->sanitizeValue($value, 'xss_admin'));
    }
}

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