public function Title::preRender in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/area/Title.php \Drupal\views\Plugin\views\area\Title::preRender()
- 9 core/modules/views/src/Plugin/views/area/Title.php \Drupal\views\Plugin\views\area\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'));
}
}