1

I have a problem with a active class using zend navigation. I don't know reason of this problem. Anyone know how to fix this or what I'm doing wrong?

when I use this route

'default' => array(     
            array(
                'label' => '<i class="fa fa-edit fa-fw"></i> Reservations <i class="fa fa-angle-left pull-right"></i>',
                'uri' => '#',
                'wrapClass' => 'treeview',
                'pages' => array(
                    array(
                        'label' => '<i class="fa fa-edit fa-fw"></i> Find Reservation',
                        'route' => 'reservations/reservation-manager', 
                        'controller' => 'ReservationManager',
                        'action'     => 'find', 
                        'resource'    => 'Reservations\Controller\ReservationManager',
                        'privilege'  => 'find',
                    ),
                ),
            ),

and module.config.php

'router' => array(
        'routes' => array(
            'reservations' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/reservations',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Reservations\Controller',
                        'controller'    => 'Index',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'default' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/[:controller[/:action]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                            ),
                        ),
                    ),
                    'reservation-manager' => array(
                        'type'    => 'Segment',
                        'may_terminate' => true,
                        'options' => array(
                            'route'    => '/reservation-manager[/:action[/:id]]',
                            'constraints' => array(
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'id'     => '[a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                                'controller' => 'Reservations\Controller\ReservationManager',
                                'action'     => 'index',
                            ),
                        ),
                    ),
                ),
            ),

Also when I try to use something like

                'route' => 'reservations', 
                'controller' => 'ReservationManager',
                'action'     => 'find', 
                'resource'    => 'Reservations\Controller\ReservationManager',

Then I have a 404 error

A 404 ERROR OCCURRED PAGE NOT FOUND. The requested controller could not be mapped to an existing controller class.

Controller: Reservations\Controller\Index(resolves to invalid controller class or alias: Reservations\Controller\Index) NO EXCEPTION AVAILABLE

MrMorf
  • 33
  • 4

0 Answers0