select()->from( 'programstatus', array( 'is_currently_running' ) )->getQuery()->fetchRow()->is_currently_running; } /** * @see MenuItemRenderer::render() */ public function render(Menu $menu) { return $this->getBadge() . $this->createLink($menu); } protected function getBadge() { if (! (bool)$this->isCurrentlyRunning()) { return sprintf( '
%s
', mt('monitoring', 'monitoring backend is not running'), 1 ); } return ''; } /** * Get the problem data for the summary * * @return array|null */ public function getSummary() { if (! (bool)$this->isCurrentlyRunning()) { return array( 'problems' => 1, 'title' => mt('monitoring', 'monitoring backend is not running') ); } return null; } }