function Text::preQuery

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()
  2. 8.9.x core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()
  3. 10 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 (str_contains($content, '[view:page-count]') || str_contains($content, '[view:total-rows]')) {
        $this->view->get_total_rows = TRUE;
    }
}

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