Elgg  Version 5.1
MenuSection.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Menu;
4 
6 
10 class MenuSection extends MenuItems implements CollectionItemInterface {
11 
15  protected $id;
16 
20  protected $priority;
21 
29  public function setId($id) {
30  $this->id = $id;
31  }
32 
38  public function getID() {
39  return $this->id;
40  }
41 
49  public function setPriority($priority) {
50  $this->priority = $priority;
51  }
52 
58  public function getPriority() {
59  return $this->priority;
60  }
61 
69  public function getItem($item_name) {
70  return $this->get($item_name);
71  }
72 
78  public function getItems() {
79  return $this->all();
80  }
81 }
Menu section.
Definition: MenuSection.php:10
setId($id)
Set ID.
Definition: MenuSection.php:29
getID()
Get unique item identifier within a collection.
Definition: MenuSection.php:38
getItems()
Get menu items.
Definition: MenuSection.php:78
getPriority()
Get priority (weight) of the item within a collection.
Definition: MenuSection.php:58
all()
{Returns all collection items by reference.CollectionItemInterface[]}
Definition: Collection.php:71
setPriority($priority)
Set section priority.
Definition: MenuSection.php:49
A collection of menu items.
Definition: MenuItems.php:10
getItem($item_name)
Get menu item by name.
Definition: MenuSection.php:69