getControllerName(); $action = $request->getActionName(); $activateLayout = true; if ( $controller == 'user' && in_array($action, array('login', 'logout')) ) { $activateLayout = false; } if ( $layout->isEnabled() && $activateLayout ) { $view = $layout->getView(); $config = include APPLICATION_PATH . '/configs/menu.config.php'; $container = new Zend_Navigation($config); // --- Add services $pagesService = array(); if ( count($view->WsServices)>0 ) { foreach ( $view->WsServices as $service => $params ) { $service = array( 'label'=> $params['name'], 'controller' => 'documentation', 'action' => 'service', 'params' => array( 'name' => $service, 'type' => $params['type'], ), ); $pagesService[] = $service; } } $found = $container->findOneByLabel("Documentation"); $found->addPages($pagesService); // --- Secure demo mode $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $user = $auth->getIdentity(); if ($user->idClient != 1) { $toSecure = $container->findOneBy('Label', "Démonstration"); $container->removePage($toSecure); } } $view->navigation($container); } } }