Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created May 23, 2011 19:38
Show Gist options
  • Save eminetto/987399 to your computer and use it in GitHub Desktop.
Save eminetto/987399 to your computer and use it in GitHub Desktop.
/*
 * navegacao
 */
$container = new Zend_Navigation(array(
        array(
        'label'  => 'Home',
        'module' => 'default',
        'controller' => 'index',
        'action' => 'index',
        'resource' => 'default_index',
        'privilege' => 'index'
        ),
        array(
                'label'  => 'Admin',
                'module' => 'admin',
                'controller' => 'admin',
                'action' => 'index',
                'resource' => 'admin_admin',
                'privilege' => 'index'
        ),
        array(
                'label'  => 'Sair',
                'module' => 'default',
                'controller' => 'index',
                'action' => 'logout',
                'resource' => 'default_index',
                'privilege' => 'logout'
    ),
));
Zend_Registry::set('Zend_Navigation', $container);
//define a acl para o menu
Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl($acl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment