Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Title.php

function 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'));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal