diff --git a/library/Icinga/Web/Navigation/NavigationItem.php b/library/Icinga/Web/Navigation/NavigationItem.php index d05229dcb..634bd6e64 100644 --- a/library/Icinga/Web/Navigation/NavigationItem.php +++ b/library/Icinga/Web/Navigation/NavigationItem.php @@ -69,11 +69,11 @@ class NavigationItem implements Countable, IteratorAggregate protected $label; /** - * Parent + * This item's parent * - * @var NavigationItem|null + * @var NavigationItem */ - private $parent; + protected $parent; /** * URL @@ -326,6 +326,29 @@ class NavigationItem implements Countable, IteratorAggregate return $this; } + /** + * Set this item's parent + * + * @param NavigationItem $parent + * + * @return $this + */ + public function setParent(NavigationItem $parent) + { + $this->parent = $parent; + return $this; + } + + /** + * Return this item's parent + * + * @return NavigationItem + */ + public function getParent() + { + return $this->parent; + } + /** * Return this item's label *