You are here

public function HandlerBase::getJoin in Views (for Drupal 7) 8.3

Get the join object that should be used for this handler.

This method isn't used a great deal, but it's very handy for easily getting the join if it is necessary to make some changes to it, such as adding an 'extra'.

1 call to HandlerBase::getJoin()
ManyToOne::summary_query in lib/Drupal/views/Plugin/views/argument/ManyToOne.php
Build the info for the summary query.

File

lib/Drupal/views/Plugin/views/HandlerBase.php, line 590
Definition of Drupal\views\Plugin\views\HandlerBase.

Class

HandlerBase

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->query->base_table;
  }
  else {
    $base_table = $this->query->relationships[$this->relationship]['base'];
  }
  $join = $this
    ->getTableJoin($this->table, $base_table);
  if ($join) {
    return clone $join;
  }
}