PHP Class Elgg\Menu\UnpreparedMenu

This also encapsulates parameters to be passed to hooks and views.
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $params, array $items ) Constructor
getItems ( ) : ElggMenuIte\ElggMenuItem[] Get the menu items
getName ( ) : string Get the menu name
getParams ( ) : array Get the menu parameters
getSortBy ( ) : string | callable Get the designated (or default) sort strategy
setSortBy ( string | callable $sort_by = 'text' ) : void Set how this menu should be sorted

Method Details

__construct() public méthode

Constructor
public __construct ( array $params, array $items )
$params array Parameters to be passed to the "prepare" hook and views. Must include value for "name".
$items array Menu items

getItems() public méthode

Get the menu items
public getItems ( ) : ElggMenuIte\ElggMenuItem[]
Résultat ElggMenuIte\ElggMenuItem[]

getName() public méthode

Get the menu name
public getName ( ) : string
Résultat string

getParams() public méthode

Get the menu parameters
public getParams ( ) : array
Résultat array

getSortBy() public méthode

Get the designated (or default) sort strategy
See also: setSortBy
See also: ElggMenuBuilder::sort
public getSortBy ( ) : string | callable
Résultat string | callable

setSortBy() public méthode

Set how this menu should be sorted
See also: ElggMenuBuilder::sort
public setSortBy ( string | callable $sort_by = 'text' ) : void
$sort_by string | callable Sort strategy "text", "name", "priority", or callback
Résultat void