parent
b7ae66b496
commit
88698cb05d
|
@ -31,11 +31,11 @@ class LayoutController extends ActionController
|
|||
{
|
||||
$topbarHtmlParts = array();
|
||||
|
||||
/** @var Hook\Layout\TopBar $hook */
|
||||
/** @var Hook\TopBarHook $hook */
|
||||
$hook = null;
|
||||
|
||||
foreach (Hook::all('TopBar') as $hook) {
|
||||
$topbarHtmlParts[] = $hook->getHtml($this->getRequest(), $this->view);
|
||||
$topbarHtmlParts[] = $hook->getHtml($this->getRequest());
|
||||
}
|
||||
|
||||
$this->view->topbarHtmlParts = $topbarHtmlParts;
|
||||
|
|
|
@ -10,15 +10,14 @@ use Zend_View;
|
|||
/**
|
||||
* Hook to extend topbar items
|
||||
*/
|
||||
abstract class TopBarHook
|
||||
abstract class TopBarHook extends WebBaseHook
|
||||
{
|
||||
/**
|
||||
* Function to generate top bar content
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Zend_View $view
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getHtml($request, $view);
|
||||
abstract public function getHtml($request);
|
||||
}
|
||||
|
|
|
@ -18,11 +18,10 @@ class TopBar extends TopBarHook
|
|||
* Function to generate top bar content
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Zend_View $view
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHtml($request, $view)
|
||||
public function getHtml($request)
|
||||
{
|
||||
$hostSummary = StatusSummaryView::fromRequest(
|
||||
$request,
|
||||
|
@ -50,7 +49,7 @@ class TopBar extends TopBarHook
|
|||
)
|
||||
)->getQuery()->fetchRow();
|
||||
|
||||
return $view->partial(
|
||||
return $this->getView()->partial(
|
||||
'layout/topbar.phtml',
|
||||
'monitoring',
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue