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

Linear set of menu items collected from configuration and the "register" hook. More...

Public Member Functions

 __construct (array $params, array $items)
 Constructor. More...
 
 setSortBy ($sort_by= 'text')
 Set how this menu should be sorted. More...
 
 getSortBy ()
 Get the designated (or default) sort strategy. More...
 
 getName ()
 Get the menu name. More...
 
 getItems ()
 Get the menu items. More...
 
 getParams ()
 Get the menu parameters. More...
 

Detailed Description

Linear set of menu items collected from configuration and the "register" hook.

This also encapsulates parameters to be passed to hooks and views.

Definition at line 11 of file UnpreparedMenu.php.

Constructor & Destructor Documentation

Elgg\Menu\UnpreparedMenu::__construct ( array  $params,
array  $items 
)

Constructor.

Parameters
array$paramsParameters to be passed to the "prepare" hook and views. Must include value for "name".
ElggMenuItem[]$items Menu items

private

Definition at line 33 of file UnpreparedMenu.php.

Member Function Documentation

Elgg\Menu\UnpreparedMenu::getItems ( )

Get the menu items.

Returns
ElggMenuItem[]

Definition at line 77 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getName ( )

Get the menu name.

Returns
string

Definition at line 68 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getParams ( )

Get the menu parameters.

Returns
array

Definition at line 86 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getSortBy ( )

Get the designated (or default) sort strategy.

See also
setSortBy
ElggMenuBuilder::sort
Returns
string|callable

Definition at line 59 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::setSortBy (   $sort_by = 'text')

Set how this menu should be sorted.

See also
ElggMenuBuilder::sort
Parameters
string | callable$sort_bySort strategy "text", "name", "priority", or callback
Returns
void

Definition at line 47 of file UnpreparedMenu.php.


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