class views_join_term_edge in Taxonomy Edge 7.2
Same name and namespace in other branches
- 8 views_taxonomy_edge/handlers/views_join_term_edge.inc \views_join_term_edge
- 6 views_taxonomy_edge/handlers/views_join_term_edge.inc \views_join_term_edge
- 7 views_taxonomy_edge/handlers/views_join_term_edge.inc \views_join_term_edge
@file
Hierarchy
- class \views_join
- class \views_join_term_edge
Expanded class hierarchy of views_join_term_edge
1 string reference to 'views_join_term_edge'
- views_taxonomy_edge_views_data in views_taxonomy_edge/
views_taxonomy_edge.views.inc - Implements hook_views_data().
File
- views_taxonomy_edge/
handlers/ views_join_term_edge.inc, line 5
View source
class views_join_term_edge extends views_join {
function build_join($select_query, $table, $view_query) {
$found = FALSE;
// If there's a condition on parent, then let it be unless it's blank.
// If it's blank we set it to the root pid.
foreach ($view_query->where as $data) {
foreach ($data['conditions'] as $condition) {
if ($condition['field'] == $table['alias'] . '.parent') {
if ($condition['value'] == '') {
$condition['value'] = taxonomy_term_edge_get_root_pid();
}
else {
$found = TRUE;
break;
}
}
}
}
// If no condition on parent was found, add the root pid as a condition.
if (!$found) {
$this->extra = array(
array(
'field' => 'parent',
'value' => taxonomy_edge_get_root_pid(),
),
);
}
parent::build_join($select_query, $table, $view_query);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 |
views_join_term_edge:: |
function |
Build the SQL for the join this object represents. Overrides views_join:: |