25 lines
764 B
PHP
25 lines
764 B
PHP
<?php
|
|
class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
|
{
|
|
public function dispatchLoopShutdown()
|
|
{
|
|
Zend_Registry::get('firebug')->info('PLUGIN XML - START');
|
|
|
|
$layout = Zend_Layout::getMVCInstance();
|
|
if ($layout->isEnabled()) {
|
|
|
|
$user = new Scores_Utilisateur();
|
|
|
|
$controller = $this->_request->getControllerName();
|
|
$action = $this->_request->getActionName();
|
|
$view = $layout->getView();
|
|
|
|
$page = new Scores_Export_Print($controller, $action);
|
|
if ($page->exportable('xml') && !empty($view->exportObjet) && in_array($user->getIdClient(), array(1,147)) ) {
|
|
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
|
}
|
|
}
|
|
|
|
Zend_Registry::get('firebug')->info('PLUGIN XML - END');
|
|
}
|
|
} |