NAME
CatalystX::NavigationMenu
SYNOPSIS
my $nm = CatalystX::NavigationMenu->new();
$nm->popupate($c);
my $menu = $nm->get_navigation($c, {level => 0});
DESCRIPTION
CatalystX::NavigationMenu provides a menu object to be used when creating and managing menus in Catalyst based on attribute data. For details of the Catalyst attributes see the L(Catalyst::Plugin::Navigation) documentation.
METHODS
populate($c)
Populates the menu based on the controllers found in the Catalyst object.
add_action($action)
Adds an element into the menu based on the Catalyst action provided.
get_child_with_path($path)
Returns a child NavigationMenu item that contains the given path. If no child is found then undef is returned.
add_item($item)
Adds the given menu item to this tree under the appropriate path entry. If the path entry isn't found then it is added to this tree.
get_navigation($c, $attrs)
Returns an array reference to a menu entry. This will only show one level of a menu. The values of the array are the values returned by the L(NavigationMenuItem) nav_entry() method.
sorted_items
Returns the menu items found at this level in sorted order. The sort order is based on their order value and an alphanumeric sort of the menu label.
get_hierarchy([$indent])
Returns a string containing the hierachy of the complete menu found here. This is mostly used for debugging that menus are setup correctly.
DEPENDENCIES
SEE ALSO
AUTHORS
Derek Wueppelmann <derek@roaringpenguin.com>
LICENSE AND COPYRIGHT
Copyright (c) 2011 Roaring Penguin Software, Inc.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.