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

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

Public Member Functions

 __construct (array $params, $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" event.

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

Definition at line 12 of file UnpreparedMenu.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
array$paramsParameters to be passed to the "prepare" event and views. Must include value for "name".

Definition at line 31 of file UnpreparedMenu.php.

Member Function Documentation

Elgg\Menu\UnpreparedMenu::getItems ( )

Get the menu items.

Returns
MenuItems

Definition at line 84 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getName ( )

Get the menu name.

Returns
string

Definition at line 75 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getParams ( )

Get the menu parameters.

Returns
array

Definition at line 93 of file UnpreparedMenu.php.

Elgg\Menu\UnpreparedMenu::getSortBy ( )

Get the designated (or default) sort strategy.

See also
self::setSortBy()
::sort()
Returns
string|callable

Definition at line 66 of file UnpreparedMenu.php.

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

Set how this menu should be sorted.

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

Definition at line 54 of file UnpreparedMenu.php.


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