Skip to content

Instantly share code, notes, and snippets.

@rufinus
Created November 13, 2012 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rufinus/4066554 to your computer and use it in GitHub Desktop.
Save rufinus/4066554 to your computer and use it in GitHub Desktop.
Navigation
namespace cwdAdmin\Service;
use Zend\Navigation\Service\AbstractNavigationFactory;
/**
* Default navigation factory.
*
* @category Zend
* @package Zend_Navigation
*/
class AdminNavigation extends AbstractNavigationFactory
{
/**
* @return string
*/
protected function getName()
{
return 'admin';
}
}
<?php
return array(
'navigation' => array(
'admin' => array(
'dashboard' => array(
'label' => 'Dashboard',
'type' => 'uri',
'uri' => '/'
),
'agency' => array(
'label' => 'Agencies',
'type' => 'uri',
'uri' => '/agency/'
),
'publisher' => array(
'label' => 'Publisher',
'type' => 'uri',
'uri' => '/publisher/'
),
'i18n' => array(
'label' => 'Translation',
'type' => 'uri',
'uri' => '/i18n/list',
'pages' => array(
'i18n_list' => array(
'label' => 'Create',
'type' => 'uri',
'uri' => '/i18n/create',
'visible' => false
),
)
)
)
)
);
'factories' => array(
'navigation' => 'cwdAdmin\Service\AdminNavigation',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment