You are here

class views_handler_join_nodehierarchy_ancestor in Node Hierarchy 7.2

Same name and namespace in other branches
  1. 6.3 includes/views/nodehierarchy.views.inc \views_handler_join_nodehierarchy_ancestor

Hierarchy

Expanded class hierarchy of views_handler_join_nodehierarchy_ancestor

1 string reference to 'views_handler_join_nodehierarchy_ancestor'
nodehierarchy_views_data in includes/views/nodehierarchy.views.inc
Implements hook_views_data().

File

includes/views/nodehierarchy.views.inc, line 129
Implementations of Views 2 Hooks for nodehierarchy_views module

View source
class views_handler_join_nodehierarchy_ancestor extends views_join {
  function build_join($select_query, $table, $view_query) {
    $left = $view_query
      ->get_table_info($this->left_table);
    $right_table = "{" . $this->table . "}";
    $on = array();
    for ($i = 1; $i < MENU_MAX_DEPTH; $i++) {
      $on[] = "{$left['alias']}.p{$i} = {$table['alias']}.mlid";
    }
    $select_query
      ->addJoin($this->type, $right_table, $table['alias'], '(' . implode(' OR ', $on) . ") AND {$left['alias']}.mlid != {$table['alias']}.mlid", array());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
views_handler_join_nodehierarchy_ancestor::build_join function Build the SQL for the join this object represents. Overrides views_join::build_join
views_join::$definition public property
views_join::$extra public property
views_join::$field public property
views_join::$left_field public property
views_join::$left_table public property
views_join::$table public property
views_join::$type public property
views_join::construct public function Construct the views_join object. 1