SproutCMS

This is the code documentation for the SproutCMS project

function determineClasses()

Determine the classes for the LI for a navigation item

Usage

array NavigationMenu::determineClasses ( Treenode $node , int $depth , int $index , Treenode $selected_node , array $selected_ancestors , bool $has_children );

Arguments

  1. Treenode $node
    The node which is being rendered
  2. int $depth
    The menu depth; 1 for top-level, 2 for a sub menu
  3. int $index
    The position in the menu; 1 for the first item, 2 for the second, etc
  4. Treenode $selected_node
    The page the user is currently looking at
  5. array $selected_ancestors
    All ancestors of the selected node (Treenode::find_ancestors)
  6. bool $has_children
    Does the node have children

Return value

  • array
    Zero or more class names