function ArgumentPluginBase::summary_query

Build the info for the summary query.

This must:

  • add_groupby: group on this field in order to create summaries.
  • add_field: add a 'num_nodes' field for the count. Usually it will be a count on $view->base_field
  • set_count_field: Reset the count field so we get the right paging.

Return value

The alias used to get the number of records (count) for this entry.

1 call to ArgumentPluginBase::summary_query()
ArgumentPluginBase::default_summary in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
Default action: summary.
3 methods override ArgumentPluginBase::summary_query()
Formula::summary_query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php
Build the summary query based on a formula
ManyToOne::summary_query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php
Build the info for the summary query.
String::summary_query 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 802
Definition of Drupal\views\Plugin\views\argument\ArgumentPluginBase.

Class

ArgumentPluginBase
Base class for arguments.

Namespace

Drupal\views\Plugin\views\argument

Code

function summary_query() {
  $this
    ->ensureMyTable();

  // Add the field.
  $this->base_alias = $this->query
    ->add_field($this->tableAlias, $this->realField);
  $this
    ->summary_name_field();
  return $this
    ->summary_basics();
}