// change to Controller workflow

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8813 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-09-27 15:20:30 +00:00
parent 86f18ce106
commit 3192ddb27d
3 changed files with 50 additions and 46 deletions
+25 -4
View File
@@ -73,7 +73,7 @@ abstract class ControllerCore
/**
* Do the page treatment : post process, ajax process, etc.
*/
abstract public function action();
abstract public function postProcess();
/**
* Display page view
@@ -111,12 +111,18 @@ abstract class ControllerCore
public function run()
{
$this->init();
$this->action();
$this->postProcess();
if ($this->displayHeader)
{
$this->setMedia();
$this->initHeader();
}
$this->initContent();
if ($this->displayFooter)
$this->initFooter();
if ($this->ajax)
{
$this->displayAjax();
}
else
$this->display();
}
@@ -135,7 +141,22 @@ abstract class ControllerCore
{
$this->template = $template;
}
/**
* Assign smarty variables for the page header
*/
abstract public function initHeader();
/**
* Assign smarty variables for the page main content
*/
abstract public function initContent();
/**
* Assign smarty variables for the page footer
*/
abstract public function initFooter();
/**
* Add a new stylesheet in page header.
*