Phang  2.1
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes
Menu_Tree Class Reference

Creates a basic tree menu of a data object using html ordered/unordered lists. More...

List of all members.

Public Member Functions

 __construct ($data, $options=array())
 Class constructor.
 is_exclude ($model, $id)
 Exclude nodes with a particular model or ID.
 build_tree ($records=null)
 Recursive method which creates an HTML list from the record's children [and its children's children etc.

Protected Attributes

 $link_field_name = ''
 Name of the field to link the models.
 $filter_name = ''
 Name of the filter.
 $exclude = array()
 Items to exclude.

Detailed Description

Creates a basic tree menu of a data object using html ordered/unordered lists.

For a flat record set, it will create a list of 'li' elements; for records which contain one-to-many relationships, it will display nested items if available. If more than one table is required, you need to specify the tables you wish to use in the $tables array, e.g. array('table_name' => array('to_string' => 'field_name', 'link_field_name' => 'field_name'));

Deprecated:
To be removed.

Member Function Documentation

Menu_Tree::build_tree (   $records = null)

Recursive method which creates an HTML list from the record's children [and its children's children etc.

].


The documentation for this class was generated from the following file: