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

Breadcrumb

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

function ManyToOne::summaryQuery

Overrides ArgumentPluginBase::summaryQuery

File

core/modules/views/src/Plugin/views/argument/ManyToOne.php, line 162

Class

ManyToOne
Argument handler for many to one relationships.

Namespace

Drupal\views\Plugin\views\argument

Code

protected function summaryQuery() {
    $field = $this->table . '.' . $this->field;
    $join = $this->getJoin();
    if (!empty($this->options['require_value'])) {
        $join->type = 'INNER';
    }
    if (empty($this->options['add_table']) || empty($this->view->many_to_one_tables[$field])) {
        $this->tableAlias = $this->query
            ->ensureTable($this->table, $this->relationship, $join);
    }
    else {
        $this->tableAlias = $this->helper
            ->summaryJoin();
    }
    // Add the field.
    $this->base_alias = $this->query
        ->addField($this->tableAlias, $this->realField);
    $this->summaryNameField();
    return $this->summaryBasics();
}

API Navigation

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