From 3660606ca1c15a105aff0fd53c02f70c58343d15 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 20 Nov 2017 13:43:32 +0100 Subject: [PATCH] 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. --- .../Icinga/Web/Navigation/NavigationItem.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/library/Icinga/Web/Navigation/NavigationItem.php b/library/Icinga/Web/Navigation/NavigationItem.php index d6d19dd61..4a1fbaf04 100644 --- a/library/Icinga/Web/Navigation/NavigationItem.php +++ b/library/Icinga/Web/Navigation/NavigationItem.php @@ -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 *