Created
October 10, 2012 13:00
-
-
Save messyOne/3865519 to your computer and use it in GitHub Desktop.
just a test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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