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

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

Public Member Functions

 __construct (protected 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" event, and split into sections.

This also encapsulates parameters to be passed to views.

Definition at line 10 of file Menu.php.

Constructor & Destructor Documentation

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

Constructor.

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

Definition at line 19 of file Menu.php.

Member Function Documentation

Elgg\Menu\Menu::getName ( )

Get the menu's name.

Returns
string

Definition at line 48 of file Menu.php.

Elgg\Menu\Menu::getParams ( )

Get the menu parameters.

Returns
array

Definition at line 57 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
MenuSection|null

Definition at line 39 of file Menu.php.

Elgg\Menu\Menu::getSections ( )

Get all menu sections.

Returns
PreparedMenu

Definition at line 27 of file Menu.php.


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