function entity_translation_hierarchy_views_handler_filter_blocking::query in Language Hierarchy 7
Add condition to select only part of the tree that is under argument's id.
Overrides views_handler_filter_boolean_operator::query
See also
entity_translation_hierarchy_views_post_execute()
File
- modules/
entity_translation_hierarchy/ views/ handlers/ filter_blocking.inc, line 20 - Definition of entity_translation_hierarchy_views_handler_filter_blocking.
Class
- entity_translation_hierarchy_views_handler_filter_blocking
- Filter by blocking column.
Code
function query() {
// Behave as normal SQL query if user want to display blocking translations.
if ($this->value) {
parent::query();
}
else {
$table = $this
->ensure_my_table();
// Add weight, depth and parent fields.
$this->query
->add_field($table, 'blocking', 'entity_translation_hierarchy_blocking');
$this->query
->add_field($table, 'entity_id', 'entity_translation_hierarchy_entity_id');
}
}