Created
August 15, 2013 21:43
-
-
Save jfranciscos4/6245244 to your computer and use it in GitHub Desktop.
Initialize new navigation in ZF1
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
/** | |
* inicializa a navegação | |
* | |
* @return void | |
* @author Elton Minetto | |
* */ | |
public function _initNavigation() { | |
/* | |
* navegacao | |
*/ | |
$container = new Zend_Navigation(array( | |
array( | |
'label' => 'Home', | |
'controller' => 'post', | |
'action' => 'retrieve', | |
), | |
array( | |
'label' => 'Adicionar Post', | |
'controller' => 'post', | |
'action' => 'create', | |
), | |
array( | |
'label' => 'Sair', | |
'controller' => 'auth', | |
'action' => 'logout', | |
), | |
)); | |
Zend_Registry::set('Zend_Navigation', $container); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment