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 {
|
||||
|
||||
//Gestion affichage Lien Print / PDF / XML
|
||||
require_once 'Scores/PagePrint.php';
|
||||
$page = new PagePrint($controller, $action);
|
||||
$page = new Scores_PagePrint($controller, $action);
|
||||
|
||||
if ($page->exportable('print')){
|
||||
$view->print = $page->filename('print', $request->getParams());
|
||||
|
@ -7,9 +7,8 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
|
||||
if ($layout->isEnabled()) {
|
||||
$controller = $this->_request->getControllerName();
|
||||
$action = $this->_request->getActionName();
|
||||
|
||||
require_once 'Scores/PagePrint.php';
|
||||
$page = new PagePrint($controller, $action);
|
||||
|
||||
$page = new Scores_PagePrint($controller, $action);
|
||||
if ($page->exportable('pdf')){
|
||||
$layout = $this->_response->getBody();
|
||||
$filename = $page->filename('pdf', $this->_request->getParams());
|
||||
|
@ -4,13 +4,12 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
||||
public function dispatchLoopShutdown()
|
||||
{
|
||||
$layout = Zend_Layout::getMVCInstance();
|
||||
if ($layout->isEnabled()) {
|
||||
if ($layout->isEnabled()) {
|
||||
$controller = $this->_request->getControllerName();
|
||||
$action = $this->_request->getActionName();
|
||||
$action = $this->_request->getActionName();
|
||||
$view = $layout->getView();
|
||||
|
||||
require_once 'Scores/PagePrint.php';
|
||||
$page = new PagePrint($controller, $action);
|
||||
|
||||
$page = new Scores_PagePrint($controller, $action);
|
||||
if ($page->exportable('xml') && !empty($view->exportObjet)) {
|
||||
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PagePrint
|
||||
class Scores_PagePrint
|
||||
{
|
||||
protected $controller = null;
|
||||
protected $action = null;
|
||||
|
Loading…
Reference in New Issue
Block a user