[*] Front: move front controllers in controllers/front/ directory

// Refactoring of front controllers part 1

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8721 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-22 15:19:42 +00:00
parent 2dbea99b61
commit 69db63f26c
94 changed files with 771 additions and 939 deletions
+56
View File
@@ -42,6 +42,37 @@ abstract class ControllerCore
*/
public $js_files = array();
/**
* @var bool check if header will be displayed
*/
protected $displayHeader = false;
/**
* @var string template name for page content
*/
protected $template;
/**
* @var string check if footer will be displayed
*/
protected $displayFooter = false;
/**
* Initialize the page
*/
abstract public function init();
/**
* Do the page treatment : post process, ajax process, etc.
* Enter description here ...
*/
abstract public function action();
/**
* Display page view
*/
abstract public function display();
/**
* Set default media list for controller
*/
@@ -64,6 +95,31 @@ abstract class ControllerCore
$this->context = Context::getContext();
}
/**
* Start controller process
*/
public function run()
{
$this->init();
$this->action();
$this->display();
}
public function displayHeader($display = true)
{
$this->displayHeader = $display;
}
public function displayFooter($display = true)
{
$this->displayFooter = $display;
}
public function setTemplate($template)
{
$this->template = $template;
}
/**
* Add a new stylesheet in page header.
*