Elgg  Version 3.0
MenuSection.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Menu;
4 
7 use ElggMenuItem;
8 
13  extends MenuItems
14  implements CollectionItemInterface {
15 
19  protected $id;
20 
24  protected $priority;
25 
33  public function setId($id) {
34  $this->id = $id;
35  }
36 
41  public function getId() {
42  return $this->id;
43  }
44 
52  public function setPriority($priority) {
53  $this->priority = $priority;
54  }
55 
60  public function getPriority() {
61  return $this->priority;
62  }
63 
71  public function getItem($item_name) {
72  return $this->get($item_name);
73  }
74 
79  public function getItems() {
80  return $this->all();
81  }
82 }
Menu section.
Definition: MenuSection.php:12
setId($id)
Set ID.
Definition: MenuSection.php:33
getId()
Get unique item identifier within a collection.
Definition: MenuSection.php:41
getItems()
Get menu items.
Definition: MenuSection.php:79
getPriority()
Get priority (weight) of the item within a collection.
Definition: MenuSection.php:60
all()
{Returns all collection items by reference.CollectionItemInterface[]}
Definition: Collection.php:68
setPriority($priority)
Set section priority.
Definition: MenuSection.php:52
A collection of menu items.
Definition: MenuItems.php:10
getItem($item_name)
Get menu item by name.
Definition: MenuSection.php:71