1 views_plugin_pager.inc views_plugin_pager::execute_count_query(&$count_query)

Execute the count query, which will be done just prior to the query itself being executed.

File

core/modules/views/plugins/views_plugin_pager.inc, line 152
Definition of views_plugin_pager.

Class

views_plugin_pager
The base plugin to handle pager.

Code

function execute_count_query(&$count_query) {
  $this->total_items = $count_query->execute()->fetchField();
  if (!empty($this->options['offset'])) {
    $this->total_items -= $this->options['offset'];
  }

  $this->update_page_info();
  return $this->total_items;
}