NavigationItem: Add property priority

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-03 08:33:13 +02:00
parent 1393db687b
commit f4a6ab73c0

View File

@ -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
*