diff --git a/library/Icinga/Web/Navigation/NavigationItem.php b/library/Icinga/Web/Navigation/NavigationItem.php index 21cafa4a5..22656bc42 100644 --- a/library/Icinga/Web/Navigation/NavigationItem.php +++ b/library/Icinga/Web/Navigation/NavigationItem.php @@ -31,6 +31,15 @@ class NavigationItem implements Countable, IteratorAggregate */ protected $active; + /** + * This item's priority + * + * The priority defines when the item is rendered in relation to its parent's childs. + * + * @var int + */ + protected $priority; + /** * The attributes of this item's element * @@ -165,6 +174,29 @@ class NavigationItem implements Countable, IteratorAggregate return $this; } + /** + * Return this item's priority + * + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Set this item's priority + * + * @param int $priority + * + * @return $this + */ + public function setPriority($priority) + { + $this->priority = (int) $priority; + return $this; + } + /** * Return the value of the given element attribute *