Last active
December 10, 2015 20:28
-
-
Save cgmartin/4488044 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
$this->navigation()->getPluginManager()->setAllowOverride(true)->setInvokableClass('menu', '\My\Helper'); | |
// In Module.php | |
public function getViewHelperConfig() | |
{ | |
return array( | |
// Change the Navigation View Helper plugins for ALL modules | |
'initializers' => array( | |
'changeNavigationHelpers' => function($helper) { | |
if ($helper instanceof \Zend\View\Helper\Navigation) { | |
$helper->getPluginManager()->setAllowOverride(true)->setInvokableClass('menu', '\My\Helper') | |
} | |
}, | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment