Views join handlers

  1. nittany7 modules/contrib/views/includes/handlers.inc views_join_handlers
  2. cis7 modules/contrib/views/includes/handlers.inc views_join_handlers
  3. mooc7 modules/contrib/views/includes/handlers.inc views_join_handlers

Handlers to tell Views how to join tables together.

Here is how you do complex joins:

class views_join_complex extends views_join {
  // PHP 4 doesn't call constructors of the base class automatically from a
  // constructor of a derived class. It is your responsibility to propagate
  // the call to constructors upstream where appropriate.
  function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {
    parent::construct($table, $left_table, $left_field, $field, $extra, $type);
  }

  function build_join($select_query, $table, $view_query) {
    $this->extra = 'foo.bar = baz.boing';
    parent::build_join($select_query, $table, $view_query);
  }
}

Classes

Namesort descending Location Description
views_join modules/contrib/views/includes/handlers.inc A function class to represent a join and create the SQL necessary to implement the join.
views_join_subquery modules/contrib/views/includes/handlers.inc Join handler for relationships that join with a subquery as the left field. eg: LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid

File

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