NavigationItem: Use setView() to initiliaze $view

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-02 15:33:45 +02:00
parent 6802c0a9e4
commit 1788cc9b6a

View File

@ -92,7 +92,7 @@ class NavigationItem implements Countable, IteratorAggregate
/** /**
* View * View
* *
* @var View|null * @var View
*/ */
protected $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() public function getView()
{ {
if ($this->view === null) { if ($this->view === null) {
$this->view = Icinga::app()->getViewRenderer()->view; $this->setView(Icinga::app()->getViewRenderer()->view);
} }
return $this->view; return $this->view;
} }