Skip to content

Instantly share code, notes, and snippets.

@messyOne
Created Oct 10, 2012
Embed
What would you like to do?
public function onModuleDispatch(\Zend\Mvc\MvcEvent $e)
{
//Set the main menu into the layout view model
$serviceManager = $e->getApplication()->getServiceManager();
$navbarContainer = $serviceManager->get('loo_navigation');
$viewModel = $e->getViewModel();
$viewModel->setVariable('navbar', $navbarContainer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment