25 lines
764 B
PHP
Raw Normal View History

2011-05-24 06:25:58 +00:00
<?php
class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopShutdown()
{
2016-04-07 15:48:55 +00:00
Zend_Registry::get('firebug')->info('PLUGIN XML - START');
$layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) {
2013-12-26 14:42:44 +00:00
$user = new Scores_Utilisateur();
$controller = $this->_request->getControllerName();
$action = $this->_request->getActionName();
2011-05-24 06:25:58 +00:00
$view = $layout->getView();
2013-11-29 13:54:52 +00:00
$page = new Scores_Export_Print($controller, $action);
2013-12-26 14:42:44 +00:00
if ($page->exportable('xml') && !empty($view->exportObjet) && in_array($user->getIdClient(), array(1,147)) ) {
2011-05-24 06:25:58 +00:00
$page->objectToXML($view->exportObjet, $this->_request->getParams());
}
}
2016-04-07 15:48:55 +00:00
Zend_Registry::get('firebug')->info('PLUGIN XML - END');
2011-05-24 06:25:58 +00:00
}
}