You are here

public function Text::preQuery in Drupal 10

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()
  2. 9 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::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;
  }
}