You are here

class menu_node_views_sort_menu in Menu Node Views 6

Same name and namespace in other branches
  1. 7.2 includes/menu_node_views_sort_menu.inc \menu_node_views_sort_menu
  2. 7 includes/menu_node_views_sort_menu.inc \menu_node_views_sort_menu

@file Views sort handler for the menu hierarchy.

Hierarchy

Expanded class hierarchy of menu_node_views_sort_menu

1 string reference to 'menu_node_views_sort_menu'
menu_node_views_views_data in ./menu_node_views.views.inc
Implement hook_views_data().

File

includes/menu_node_views_sort_menu.inc, line 8
Views sort handler for the menu hierarchy.

View source
class menu_node_views_sort_menu extends views_handler_sort {
  function query() {
    $this
      ->ensure_my_table();
    $start_depth = isset($this->options['start_depth']) ? $this->options['start_depth'] : 1;
    $max_depth = !empty($this->options['max_depth']) ? $this->options['max_depth'] : MENU_MAX_DEPTH;
    for ($i = $start_depth; $i <= $max_depth; $i++) {
      $this->query
        ->add_orderby($this->table_alias, "p{$i}", $this->options['order']);
    }
  }

}

Members