You are here

public function Text::preQuery in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::preQuery()

Run before the view is built.

This gives all the handlers some time to set up before any handler has been fully run.

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;
  }
}