function views_handler::get_join

3.x handlers.inc views_handler::get_join()
2.x handlers.inc views_handler::get_join()

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 views_handler::get_join()

File

includes/handlers.inc, line 703
Defines the various handler objects to help build and display views.

Class

views_handler
Base handler, from which all the other handlers are derived. It creates a common interface to create consistency amongst handlers and data.

Code

function get_join() {
  // 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 = views_get_table_join($this->table, $base_table);
  if ($join) {
    return clone $join;
  }
}