Skip to content

Instantly share code, notes, and snippets.

@jfranciscos4
Created August 15, 2013 21:43
Show Gist options
  • Save jfranciscos4/6245244 to your computer and use it in GitHub Desktop.
Save jfranciscos4/6245244 to your computer and use it in GitHub Desktop.
Initialize new navigation in ZF1
/**
* 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