public function ArgumentPluginBase::summaryBasics

Some basic summary behavior that doesn't need to be repeated as much as code that goes into summaryQuery()

4 calls to ArgumentPluginBase::summaryBasics()
ArgumentPluginBase::summaryQuery in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
Build the info for the summary query.
Formula::summaryQuery in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php
Build the summary query based on a formula
ManyToOne::summaryQuery in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php
Build the info for the summary query.
String::summaryQuery in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php
Build the summary query based on a string

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php, line 854
Definition of Drupal\views\Plugin\views\argument\ArgumentPluginBase.

Class

ArgumentPluginBase
Base class for arguments.

Namespace

Drupal\views\Plugin\views\argument

Code

public function summaryBasics($count_field = TRUE) {

  // Add the number of nodes counter
  $distinct = $this->view->display_handler
    ->getOption('distinct') && empty($this->query->no_distinct);
  $count_alias = $this->query
    ->addField($this->view->storage
    ->get('base_table'), $this->view->storage
    ->get('base_field'), 'num_records', array(
    'count' => TRUE,
    'distinct' => $distinct,
  ));
  $this->query
    ->addGroupBy($this->name_alias);
  if ($count_field) {
    $this->query
      ->set_count_field($this->tableAlias, $this->realField);
  }
  $this->count_alias = $count_alias;
}