|
Elgg
Version 6.3
|
A collection of menu items. More...
Public Member Functions | |||||||
| __construct ($items=[], $item_class=\ElggMenuItem::class) | |||||||
{Constructor.
| |||||||
Public Member Functions inherited from Elgg\Collections\Collection | |||||||
| all () | |||||||
{Returns all collection items by reference.
| |||||||
| count () | |||||||
{Count collection items.
| |||||||
| add ($item) | |||||||
{Add a new item to collection.
| |||||||
| get ($id) | |||||||
{Get an item by its ID.
| |||||||
| has ($id) | |||||||
{Check if collection has an item with a given ID.
| |||||||
| remove ($id) | |||||||
{Remove item from collection by its ID.
| |||||||
| fill ($items) | |||||||
{Replace collection items.
| |||||||
| merge ($items) | |||||||
{Add new items to collection, replacing items with matching IDs.
| |||||||
| filter (?callable $callback=null) | |||||||
{Filter collection items using a custom filter Returns a new collection instance.
| |||||||
| sort (?callable $callback=null) | |||||||
{Sort fields using custom callable If not provided, will sort items by priority.
| |||||||
| 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.
| |||||||
| 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... | |||||||
Additional Inherited Members | |
Protected Member Functions inherited from Elgg\Collections\Collection | |
| assertValidItem ($item) | |
| Validate if item is a valid collection item. More... | |
Protected Attributes inherited from Elgg\Collections\Collection | |
| $items = [] | |
| $item_class | |
| $position | |
A collection of menu items.
Definition at line 10 of file MenuItems.php.
| Elgg\Menu\MenuItems::__construct | ( | $items = [], |
|
$item_class = \ElggMenuItem::class |
|||
| ) |
{Constructor.
| CollectionItemInterface[] | $items | Items |
| string | $item_class | Member class Restrict members of the collection to instances of this class |
Reimplemented from Elgg\Collections\Collection.
Definition at line 15 of file MenuItems.php.