function Title::preRender
Performs any operations needed before full rendering.
Parameters
array $results: The results of the view.
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\areaCode
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.