function HandlerBase::getJoin

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getJoin()
  2. 8.9.x core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getJoin()
  3. 10 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getJoin()

Overrides ViewsHandlerInterface::getJoin

1 call to HandlerBase::getJoin()
ManyToOne::summaryQuery in core/modules/views/src/Plugin/views/argument/ManyToOne.php

File

core/modules/views/src/Plugin/views/HandlerBase.php, line 682

Class

HandlerBase
Base class for Views handler plugins.

Namespace

Drupal\views\Plugin\views

Code

public function getJoin() {
    // Get the join from this table that links back to the base table.
    // Determine the primary table to seek
    if (empty($this->query->relationships[$this->relationship])) {
        $base_table = $this->view->storage
            ->get('base_table');
    }
    else {
        $base_table = $this->query->relationships[$this->relationship]['base'];
    }
    $join = $this->getTableJoin($this->table, $base_table);
    if ($join) {
        return clone $join;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.