select()->from( 'statusSummary', array( 'services_critical_unhandled' ) )->getQuery()->fetchRow(); $badge = ''; if ($statusSummary->services_critical_unhandled) { $badge = sprintf( '
%s
', t(sprintf('%d unhandled service problems', $statusSummary->services_critical_unhandled)), $statusSummary->services_critical_unhandled ); } return sprintf( '%s%s %s', $menu->getUrl() ?: '#', $menu->getIcon() ? ' ' : '', htmlspecialchars($menu->getTitle()), $badge ); } }