From b7ae66b496e750836cd619b898f5fb72475e7187 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Wed, 27 Aug 2014 11:23:03 +0200 Subject: [PATCH] Hook: Add web hook base class refs #6929 --- library/Icinga/Web/Hook/WebBaseHook.php | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 library/Icinga/Web/Hook/WebBaseHook.php diff --git a/library/Icinga/Web/Hook/WebBaseHook.php b/library/Icinga/Web/Hook/WebBaseHook.php new file mode 100644 index 000000000..a901787bb --- /dev/null +++ b/library/Icinga/Web/Hook/WebBaseHook.php @@ -0,0 +1,51 @@ +view = $view; + } + + /** + * Get the view instance + * + * @return Zend_View + */ + public function getView() + { + if ($this->view === null) { + $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); + if ($viewRenderer->view === null) { + $viewRenderer->initView(); + } + $this->view = $viewRenderer->view; + } + + return $this->view; + } +} \ No newline at end of file