From 1788cc9b6a953d7571b7a5ba955f804fbab31403 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 2 Sep 2015 15:33:45 +0200 Subject: [PATCH] NavigationItem: Use setView() to initiliaze $view refs #5600 --- library/Icinga/Web/Navigation/NavigationItem.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Web/Navigation/NavigationItem.php b/library/Icinga/Web/Navigation/NavigationItem.php index a90700116..5e168677c 100644 --- a/library/Icinga/Web/Navigation/NavigationItem.php +++ b/library/Icinga/Web/Navigation/NavigationItem.php @@ -92,7 +92,7 @@ class NavigationItem implements Countable, IteratorAggregate /** * View * - * @var View|null + * @var View */ protected $view; @@ -422,15 +422,16 @@ class NavigationItem implements Countable, IteratorAggregate } /** - * Get the view + * Return the view * - * @return View + * @return View */ public function getView() { if ($this->view === null) { - $this->view = Icinga::app()->getViewRenderer()->view; + $this->setView(Icinga::app()->getViewRenderer()->view); } + return $this->view; }