[ Index ]

PHP Cross Reference of Akelos Framework

title

Body

[close]

/AkActionView/helpers/ -> menu_helper.php (summary)

(no description)

Author: Bermi Ferrer
Copyright: Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org
License: GNU Lesser General Public License
File Size: 126 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MenuHelper:: (3 methods):
  menu_for_controllers()
  _get_default_full_menu()
  _get_this_class_methods()


Class: MenuHelper  - X-Ref

The Menu Helper makes it easier to create simple menus from controllers actions.

menu_for_controllers($menu_options = array()   X-Ref
Returns a menu for all or several actions in all or several controllers.

Let +menu_options+ defaults and this will generate a menu with all actions in all controllers.
Set +menu_options+ to an array with keys as controller name and values as actions names.

<?php echo $menu_helper->menu_for_controllers(array('advertiser' => array('buy', 'partial_in_template'))); ?>
will generate something like :
<div id="menu">
<ul>
<li>
<h2><a href="/advertiser/">Advertiser</a></h2>
<ul>
<li><a href="/advertiser/buy/">Buy</a></li>
<li><a href="/advertiser/partial_in_template/">Partial in template</a></li>
</ul>
</li>
</ul>
</div>

+div_menu_id+: the id of the main div (default is "menu")
+current_class+: the class name of the current controller or the current action (default is "current")
+title_tag+: the tag that will contain the controller name link (default is "h2"). If it's empty, it won't be present

_get_default_full_menu()   X-Ref
No description

_get_this_class_methods($class)   X-Ref
No description



Generated: Mon Oct 27 12:43:49 2008 Cross-referenced by PHPXref 0.6