public function Title::preRender in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 50 - Contains \Drupal\views\Plugin\views\area\Title.
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'));
}
}