i'm working with Zend Framework 2 and i would like to make a navigation for Admin
module. How to do that?
Can i simply add local.php
with navigation tree in module/Admin/config/autoload
?
EDIT: now i have navigation in the app-root/config/autoload/global.php
:
'navigation' => array(
'default' => array(
array(
'label' => 'Admin home',
'route' => 'admin',
)
)
)
and in app-root/module/Admin/config/module.config.php
:
'service_manager' => array(
'factories' => array(
'Navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory'
)
)
and in app-root/module/Admin/view/layout/layout.phtml
:
<?php echo $this->navigation('navigation')->menu(); ?>
And everything work good, but when i cut the navigation
array from app-root/config/autoload/global.php
and place it in app-root/module/Admin/config/autoload/global.php
i get an error that: Navigation can't be initalized
.