Skip to content

Instantly share code, notes, and snippets.

@messyOne
Created Oct 10, 2012
Embed
What would you like to do?
just a test
public function getViewHelperConfig()
{
return array(
'initializers' => array(
function($instance, $viewServiceManager) {
if ($instance instanceof ServiceLocatorAwareInterface) {
$instance->setServiceLocator($viewServiceManager->getServiceLocator());
}
}
),
'factories' => array(
'navigation' => function($sm) {
$navigation = $sm->get('Zend\View\Helper\Navigation');
// get my acl
$acl = $sm->getServiceLocator()->get('BjyAuthorize\Service\Authorize')->getAcl();
$navigation->setAcl($acl);
// set guest role
$navigation->setRole('guest');
return $navigation;
}
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment