|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($text, moodle_url $url=null, $title=null, $sort=null, custom_menu_item $parent=null) | |
| add ($text, moodle_url $url=null, $title=null, $sort=null) | |
| get_text () | |
| get_url () | |
| get_title () | |
| get_children () | |
| get_sort_order () | |
| get_parent () | |
| sort () | |
| has_children () | |
| set_text ($text) | |
| set_title ($title) | |
| set_url (moodle_url $url) | |
Protected Attributes | |
| $text | |
| $url | |
| $title | |
| $sort | |
| $parent | |
| $children = array() | |
| $lastsort = 0 | |
Custom menu item
This class is used to represent one item within a custom menu that may or may not have children.
Definition at line 2248 of file outputcomponents.php.
| __construct | ( | $ | text, |
| moodle_url $ | url = null, |
||
| $ | title = null, |
||
| $ | sort = null, |
||
| custom_menu_item $ | parent = null |
||
| ) |
Constructs the new custom menu item
| string | $text | |
| moodle_url | $url | A moodle url to apply as the link for this item [Optional] |
| string | $title | A title to apply to this item [Optional] |
| int | $sort | A sort or to use if we need to sort differently [Optional] |
| custom_menu_item | $parent | A reference to the parent custom_menu_item this child belongs to, only if the child has a parent. [Optional] |
Definition at line 2294 of file outputcomponents.php.

| add | ( | $ | text, |
| moodle_url $ | url = null, |
||
| $ | title = null, |
||
| $ | sort = null |
||
| ) |
Adds a custom menu item as a child of this node given its properties.
| string | $text | |
| moodle_url | $url | |
| string | $title | |
| int | $sort |
Definition at line 2311 of file outputcomponents.php.

| get_children | ( | ) |
Sorts and returns the children for this item
Definition at line 2345 of file outputcomponents.php.


| get_parent | ( | ) |
Gets the parent this child belong to
Definition at line 2360 of file outputcomponents.php.
| get_sort_order | ( | ) |
Gets the sort order for this child
Definition at line 2353 of file outputcomponents.php.


| get_text | ( | ) |
Returns the text for this item
Definition at line 2324 of file outputcomponents.php.

| get_title | ( | ) |
Returns the title for this item
Definition at line 2338 of file outputcomponents.php.

| get_url | ( | ) |
Returns the url for this item
Definition at line 2331 of file outputcomponents.php.

| has_children | ( | ) |
Returns true if this item has any children
Definition at line 2373 of file outputcomponents.php.

| set_text | ( | $ | text | ) |
Sets the text for the node
| string | $text |
Definition at line 2381 of file outputcomponents.php.
| set_title | ( | $ | title | ) |
Sets the title for the node
| string | $title |
Definition at line 2389 of file outputcomponents.php.
| set_url | ( | moodle_url $ | url | ) |
Sets the url for the node
| moodle_url | $url |
Definition at line 2397 of file outputcomponents.php.
| sort | ( | ) |
Sorts the children this item has
Definition at line 2366 of file outputcomponents.php.

$children = array() [protected] |
Definition at line 2278 of file outputcomponents.php.
$lastsort = 0 [protected] |
Definition at line 2283 of file outputcomponents.php.
$parent [protected] |
Definition at line 2273 of file outputcomponents.php.
$sort [protected] |
Definition at line 2268 of file outputcomponents.php.
$text [protected] |
Definition at line 2253 of file outputcomponents.php.
$title [protected] |
Definition at line 2263 of file outputcomponents.php.
$url [protected] |
Definition at line 2258 of file outputcomponents.php.