function views_menu_children_argument::query in Views Menu Node Children Filter 7
Set up the query for this argument.
The argument sent may be found at $this->argument.
Parameters
bool $group_by: Whether the query uses a group-by.
Overrides views_handler_argument_numeric::query
File
- includes/
views_menu_children_argument.inc, line 81
Class
Code
function query($group_by = FALSE) {
$this
->ensure_my_table();
$menu_name = $this->options['target_menu'];
// The magic sauce! Joining the menu_links table onto the node table ;)
self::joinMenuLinksTableToNode($this->query, $menu_name);
if (!empty($this->options['break_phrase'])) {
views_break_phrase($this->argument, $this);
}
else {
$this->value = array(
$this->argument,
);
}
$page_identifier = reset($this->value);
// If the value is an integer, we assume it is a node ID.
if (is_numeric($page_identifier) && $page_identifier != "0") {
$page_identifier = "node/{$page_identifier}";
}
self::filterByParentPage($page_identifier, $menu_name, $this->query);
$this
->filterDisabledNodesLinks($this->query);
}