Autoloading PagePrint
This commit is contained in:
parent
fe434d5da9
commit
ca94202d5c
@ -57,8 +57,7 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
//Gestion affichage Lien Print / PDF / XML
|
//Gestion affichage Lien Print / PDF / XML
|
||||||
require_once 'Scores/PagePrint.php';
|
$page = new Scores_PagePrint($controller, $action);
|
||||||
$page = new PagePrint($controller, $action);
|
|
||||||
|
|
||||||
if ($page->exportable('print')){
|
if ($page->exportable('print')){
|
||||||
$view->print = $page->filename('print', $request->getParams());
|
$view->print = $page->filename('print', $request->getParams());
|
||||||
|
@ -8,8 +8,7 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
|
|||||||
$controller = $this->_request->getControllerName();
|
$controller = $this->_request->getControllerName();
|
||||||
$action = $this->_request->getActionName();
|
$action = $this->_request->getActionName();
|
||||||
|
|
||||||
require_once 'Scores/PagePrint.php';
|
$page = new Scores_PagePrint($controller, $action);
|
||||||
$page = new PagePrint($controller, $action);
|
|
||||||
if ($page->exportable('pdf')){
|
if ($page->exportable('pdf')){
|
||||||
$layout = $this->_response->getBody();
|
$layout = $this->_response->getBody();
|
||||||
$filename = $page->filename('pdf', $this->_request->getParams());
|
$filename = $page->filename('pdf', $this->_request->getParams());
|
||||||
|
@ -9,8 +9,7 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
|||||||
$action = $this->_request->getActionName();
|
$action = $this->_request->getActionName();
|
||||||
$view = $layout->getView();
|
$view = $layout->getView();
|
||||||
|
|
||||||
require_once 'Scores/PagePrint.php';
|
$page = new Scores_PagePrint($controller, $action);
|
||||||
$page = new PagePrint($controller, $action);
|
|
||||||
if ($page->exportable('xml') && !empty($view->exportObjet)) {
|
if ($page->exportable('xml') && !empty($view->exportObjet)) {
|
||||||
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class PagePrint
|
class Scores_PagePrint
|
||||||
{
|
{
|
||||||
protected $controller = null;
|
protected $controller = null;
|
||||||
protected $action = null;
|
protected $action = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user