|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| add (navigation_node $node, $beforekey=null) | |
| get_key_list () | |
| get ($key, $type=null) | |
| find ($key, $type=null) | |
| last () | |
| type ($type) | |
| remove ($key, $type=null) | |
| count () | |
| getIterator () | |
Protected Attributes | |
| $collection = array() | |
| $orderedcollection = array() | |
| $last = null | |
| $count = 0 | |
Definition at line 689 of file navigationlib.php.
| add | ( | navigation_node $ | node, |
| $ | beforekey = null |
||
| ) |
Adds a navigation node to the collection
| navigation_node | $node | Node to add |
| string | $beforekey | If specified, adds before a node with this key, otherwise adds at end |
Definition at line 721 of file navigationlib.php.

| count | ( | ) |
Gets the number of nodes in this collection
This option uses an internal count rather than counting the actual options to avoid a performance hit through the count function.
Definition at line 895 of file navigationlib.php.

| find | ( | $ | key, |
| $ | type = null |
||
| ) |
Searches for a node with matching key and type.
This function searches both the nodes in this collection and all of the nodes in each collection belonging to the nodes in this collection.
Recursive.
| string | int | $key | The key of the node we want to find. |
| int | $type | One of navigation_node::TYPE_*. |
Definition at line 824 of file navigationlib.php.

| get | ( | $ | key, |
| $ | type = null |
||
| ) |
Fetches a node from this collection.
| string | int | $key | The key of the node we want to find. |
| int | $type | One of navigation_node::TYPE_*. |
Definition at line 795 of file navigationlib.php.
| get_key_list | ( | ) |
Return a list of all the keys of all the nodes.
Definition at line 780 of file navigationlib.php.

| getIterator | ( | ) |
Gets an array iterator for the collection.
This is required by the IteratorAggregator interface and is used by routines such as the foreach loop.
Definition at line 906 of file navigationlib.php.

| last | ( | ) |
Fetches the last node that was added to this collection
Definition at line 851 of file navigationlib.php.

| remove | ( | $ | key, |
| $ | type = null |
||
| ) |
Removes the node with the given key and type from the collection
| string | int | $key | |
| int | $type |
Definition at line 871 of file navigationlib.php.

| type | ( | $ | type | ) |
Fetches all nodes of a given type from this collection
Definition at line 858 of file navigationlib.php.
$collection = array() [protected] |
Definition at line 695 of file navigationlib.php.
$count = 0 [protected] |
Definition at line 711 of file navigationlib.php.
$last = null [protected] |
Definition at line 706 of file navigationlib.php.
$orderedcollection = array() [protected] |
Definition at line 701 of file navigationlib.php.