// change to Controller workflow

This commit is contained in:
tDidierjean
2011-09-27 15:20:30 +00:00
parent 20ac8ee109
commit c9d58d45a0
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.
*