Creates a basic tree menu of a data object using html ordered/unordered lists. More...
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. |
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'));
Menu_Tree::build_tree | ( | $records = null | ) |
Recursive method which creates an HTML list from the record's children [and its children's children etc.
].