2011-04-15 09:05:30 +00:00
|
|
|
<?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)
|
|
|
|
{
|
|
|
|
$siret = $request->getParam('siret', null);
|
|
|
|
$id = $request->getParam('id', null);
|
2011-04-27 12:09:12 +00:00
|
|
|
$layout = Zend_Layout::getMVCInstance();
|
2011-04-15 09:05:30 +00:00
|
|
|
if ($layout->isEnabled()) {
|
|
|
|
require_once 'Scores/Menu.php';
|
|
|
|
$computeMenu = new Menu($siret, $id);
|
|
|
|
$menu = $computeMenu->getMenu();
|
2011-04-22 15:10:03 +00:00
|
|
|
$view = $layout->getView();
|
2011-04-15 09:05:30 +00:00
|
|
|
$view->navigation($menu);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|