function Text::preQuery

Same name and namespace in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()
  2. 10 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()
  3. 11.x core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()

Overrides HandlerBase::preQuery

File

core/modules/views/src/Plugin/views/area/Text.php, line 49

Class

Text
Views area text handler.

Namespace

Drupal\views\Plugin\views\area

Code

public function preQuery() {
    $content = $this->options['content']['value'];
    // Check for tokens that require a total row count.
    if (strpos($content, '[view:page-count]') !== FALSE || strpos($content, '[view:total-rows]') !== FALSE) {
        $this->view->get_total_rows = TRUE;
    }
}

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