function views_handler::get_join

Same name in other branches
  1. 7.x-3.x includes/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()
views_handler_argument_many_to_one::summary_query in handlers/views_handler_argument_many_to_one.inc
Build the info for the summary query.

File

includes/handlers.inc, line 708

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 drupal_clone($join);
    }
}