Moodle  2.2.1
http://www.collinsharper.com
navbar Class Reference
Inheritance diagram for navbar:
Collaboration diagram for navbar:

Public Member Functions

 __construct (moodle_page $page)
 has_items ()
 ignore_active ($setting=true)
 get ($key, $type=null)
 get_items ()
 add ($text, $action=null, $type=self::TYPE_CUSTOM, $shorttext=null, $key=null, pix_icon $icon=null)

Data Fields

 $children = array()
 $includesettingsbase = false

Protected Attributes

 $initialised = false
 $keys = array()
 $content = null
 $page
 $ignoreactive = false
 $duringinstall = false
 $hasitems = false
 $items

Detailed Description

Definition at line 2612 of file navigationlib.php.


Constructor & Destructor Documentation

__construct ( moodle_page page)

The almighty constructor

Parameters:
moodle_page$page

Reimplemented in exposed_navbar.

Definition at line 2638 of file navigationlib.php.

Here is the call graph for this function:


Member Function Documentation

add ( text,
action = null,
type = self::TYPE_CUSTOM,
shorttext = null,
key = null,
pix_icon icon = null 
)

Add a new navigation_node to the navbar, overrides parent::add

This function overrides navigation_node::add() so that we can change the way nodes get added to allow us to simply call add and have the node added to the end of the navbar

Parameters:
string$text
string | moodle_url$action
int$type
string | int$key
string$shorttext
string$icon
Returns:
navigation_node

Reimplemented from navigation_node.

Definition at line 2778 of file navigationlib.php.

Here is the call graph for this function:

get ( key,
type = null 
)

Get ths child of this node that has the given key + (optional) type.

If you are looking for a node and want to search all children + thier children then please use the find method instead.

Parameters:
int | string$keyThe key of the node we are looking for
int$typeOne of navigation_node::TYPE_*
Returns:
navigation_node|false

Reimplemented from navigation_node.

Definition at line 2681 of file navigationlib.php.

get_items ( )

Returns an array of navigation_node's that make up the navbar.

Returns:
array

Definition at line 2694 of file navigationlib.php.

Here is the call graph for this function:

has_items ( )

Quick check to see if the navbar will have items in.

Returns:
bool Returns true if the navbar will have items, false otherwise

Definition at line 2657 of file navigationlib.php.

Here is the caller graph for this function:

ignore_active ( setting = true)

Turn on/off ignore active

Parameters:
bool$setting

Definition at line 2678 of file navigationlib.php.


Field Documentation

$children = array()

Reimplemented from navigation_node.

Definition at line 2630 of file navigationlib.php.

$content = null [protected]

Definition at line 2618 of file navigationlib.php.

$duringinstall = false [protected]

Definition at line 2624 of file navigationlib.php.

$hasitems = false [protected]

Definition at line 2626 of file navigationlib.php.

$ignoreactive = false [protected]

Definition at line 2622 of file navigationlib.php.

$includesettingsbase = false

Definition at line 2632 of file navigationlib.php.

$initialised = false [protected]

Definition at line 2614 of file navigationlib.php.

$items [protected]

Definition at line 2628 of file navigationlib.php.

$keys = array() [protected]

Definition at line 2616 of file navigationlib.php.

$page [protected]

Definition at line 2620 of file navigationlib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations