Elgg  Version 2.3
Public Member Functions | List of all members
Elgg\Menu\Menu Class Reference

A complete menu, sorted, filtered by the "prepare" hook, and split into sections. More...

Public Member Functions

 __construct (array $params)
 Constructor. More...
 
 getSections ()
 Get all menu sections. More...
 
 getSection ($name, $default=null)
 Get a single menu section. More...
 
 getName ()
 Get the menu's name. More...
 
 getParams ()
 Get the menu parameters. More...
 

Detailed Description

A complete menu, sorted, filtered by the "prepare" hook, and split into sections.

This also encapsulates parameters to be passed to views.

Definition at line 11 of file Menu.php.

Constructor & Destructor Documentation

Elgg\Menu\Menu::__construct ( array  $params)

Constructor.

Parameters
array$paramsParams. Must include: "name" menu name "menu" array of sections (each an array of items) private

Definition at line 27 of file Menu.php.

Member Function Documentation

Elgg\Menu\Menu::getName ( )

Get the menu's name.

Returns
string

Definition at line 57 of file Menu.php.

Elgg\Menu\Menu::getParams ( )

Get the menu parameters.

Returns
array

Definition at line 66 of file Menu.php.

Elgg\Menu\Menu::getSection (   $name,
  $default = null 
)

Get a single menu section.

Parameters
string$nameSection name
mixed$defaultValue to return if section is not found
Returns
ElggMenuItem[]|null

Definition at line 48 of file Menu.php.

Elgg\Menu\Menu::getSections ( )

Get all menu sections.

Returns
ElggMenuItem[][]

Definition at line 36 of file Menu.php.


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