1 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 getting the join if it is necessary to make some changes to it, such as adding an 'extra'.
File
- core/
modules/ views/ includes/ handlers.inc, line 592 - 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;
}
}