Allow to set a description for navigation items

We will introduce a navigation dashboard for root menu items which do not a have a URL but children.
This commit is contained in:
Eric Lippmann 2017-11-20 13:43:32 +01:00
parent bc4b9fb4e0
commit 3660606ca1
1 changed files with 31 additions and 0 deletions

View File

@ -88,6 +88,13 @@ class NavigationItem implements IteratorAggregate
*/
protected $label;
/**
* The item's description
*
* @var string
*/
protected $description;
/**
* This item's parent
*
@ -481,6 +488,30 @@ class NavigationItem implements IteratorAggregate
return $this;
}
/**
* Get the item's description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set the item's description
*
* @param string $description
*
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Set this item's url target
*