Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArgumentPluginBase.php

function ArgumentPluginBase::summaryQuery

Build the info for the summary query.

This must:

  • addGroupBy: group on this field in order to create summaries.
  • addField: add a 'num_nodes' field for the count. Usually it will be a count on $view->base_field
  • setCountField: Reset the count field so we get the right paging.
1 call to ArgumentPluginBase::summaryQuery()
ArgumentPluginBase::defaultSummary in core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
Default action: summary.
3 methods override ArgumentPluginBase::summaryQuery()
Formula::summaryQuery in core/modules/views/src/Plugin/views/argument/Formula.php
Build the summary query based on a formula.
ManyToOne::summaryQuery in core/modules/views/src/Plugin/views/argument/ManyToOne.php
Build the info for the summary query.
StringArgument::summaryQuery in core/modules/views/src/Plugin/views/argument/StringArgument.php
Build the summary query based on a string.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 911

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

protected function summaryQuery() {
    $this->ensureMyTable();
    // Add the field.
    $this->base_alias = $this->query
        ->addField($this->tableAlias, $this->realField);
    $this->summaryNameField();
    $this->summaryBasics();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal