Menu section.
More...
|
| setId ($id) |
| Set ID. More...
|
|
| getID () |
| Get unique item identifier within a collection. More...
|
|
| setPriority ($priority) |
| Set section priority. More...
|
|
| getPriority () |
| Get priority (weight) of the item within a collection. More...
|
|
| getItem ($item_name) |
| Get menu item by name. More...
|
|
| getItems () |
| Get menu items. More...
|
|
| __construct ($items=[], $item_class=null) |
| Constructor. More...
|
|
| all () |
| {Returns all collection items by reference.- Returns
- CollectionItemInterface[]
} More...
|
|
| count () |
| {Count collection items.- Returns
- int
} More...
|
|
| add ($item) |
| {Add a new item to collection.- Parameters
-
- Returns
- static
} More...
|
|
| get ($id) |
| {Get an item by its ID.- Parameters
-
- Returns
- CollectionItemInterface|null
} More...
|
|
| has ($id) |
| {Check if collection has an item with a given ID.- Parameters
-
- Returns
- bool
} More...
|
|
| remove ($id) |
| {Remove item from collection by its ID.- Parameters
-
- Returns
- static
} More...
|
|
| fill ($items) |
| {Replace collection items.- Parameters
-
CollectionItemInterface[]|Collection | $items Items |
- Returns
- static
} More...
|
|
| merge ($items) |
| {Add new items to collection, replacing items with matching IDs.- Parameters
-
CollectionItemInterface[]|Collection | $items Items |
- Returns
- static
} More...
|
|
| filter (?callable $callback=null) |
| {Filter collection items using a custom filter Returns a new collection instance.- Parameters
-
null | callable | $callback | Filter |
- Returns
- static
} More...
|
|
| sort (?callable $callback=null) |
| {Sort fields using custom callable If not provided, will sort items by priority.- Parameters
-
null | callable | $callback | Sorter |
- Returns
- static
} More...
|
|
| walk (callable $callback) |
| Walk through members of the collection and apply a callback. More...
|
|
| map (callable $callback) |
| {Walk through all items in the collection and apply a callback.- Parameters
-
- Returns
- mixed
} More...
|
|
| offsetExists ($offset) |
| ArrayAccess interface functions. More...
|
|
| offsetGet ($offset) |
| {} More...
|
|
| offsetSet ($offset, $value) |
| {} More...
|
|
| offsetUnset ($offset) |
| {} More...
|
|
| current () |
| SeekableIterator interface functions. More...
|
|
| next () |
| {} More...
|
|
| key () |
| {} More...
|
|
| valid () |
| {} More...
|
|
| rewind () |
| {} More...
|
|
| seek ($offset) |
| {} More...
|
|
Menu section.
Definition at line 10 of file MenuSection.php.
Elgg\Menu\MenuSection::getID |
( |
| ) |
|
Elgg\Menu\MenuSection::getItem |
( |
|
$item_name | ) |
|
Get menu item by name.
- Parameters
-
string | $item_name | Menu item name |
- Returns
- |null
Definition at line 69 of file MenuSection.php.
Elgg\Menu\MenuSection::getItems |
( |
| ) |
|
Elgg\Menu\MenuSection::getPriority |
( |
| ) |
|
Elgg\Menu\MenuSection::setId |
( |
|
$id | ) |
|
Elgg\Menu\MenuSection::setPriority |
( |
|
$priority | ) |
|
Set section priority.
- Parameters
-
- Returns
- void
Definition at line 49 of file MenuSection.php.
Elgg\Menu\MenuSection::$id |
|
protected |
Elgg\Menu\MenuSection::$priority |
|
protected |
The documentation for this class was generated from the following file: