class views_handler_join_nodehierarchy_ancestor in Node Hierarchy 7.2
Same name and namespace in other branches
- 6.3 includes/views/nodehierarchy.views.inc \views_handler_join_nodehierarchy_ancestor
Hierarchy
- class \views_join
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_handler_join_nodehierarchy_ancestor:: |
function |
Build the SQL for the join this object represents. Overrides views_join:: |
||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | property | ||
views_join:: |
public | function | Construct the views_join object. | 1 |