2011-04-15 09:05:30 +00:00

23 lines
679 B
PHP

<?php
class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
{
/**
* Créer le menu en fonction des besoins et des paramètres en entrée
* @param Zend_Controller_Request_Abstract $request
*/
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
$layout = Zend_Layout::getMVCInstance();
$view = $layout->getView();
$siret = $request->getParam('siret', null);
$id = $request->getParam('id', null);
if ($layout->isEnabled()) {
require_once 'Scores/Menu.php';
$computeMenu = new Menu($siret, $id);
$menu = $computeMenu->getMenu();
$view->navigation($menu);
}
}
}