[*] FO : Move header modules to new hook, first part 1/2

This commit is contained in:
gRoussac
2013-12-10 20:52:22 +01:00
parent 78df7f52f4
commit 1dcc5e288c
41 changed files with 306 additions and 311 deletions
+9 -6
View File
@@ -33,7 +33,7 @@ class BlockUserInfo extends Module
{
$this->name = 'blockuserinfo';
$this->tab = 'front_office_features';
$this->version = 0.1;
$this->version = 0.2;
$this->author = 'PrestaShop';
$this->need_instance = 0;
@@ -45,7 +45,7 @@ class BlockUserInfo extends Module
public function install()
{
return (parent::install() AND $this->registerHook('top') AND $this->registerHook('header'));
return (parent::install() && $this->registerHook('displayNav') && $this->registerHook('displayNav') && $this->registerHook('displayHeader'));
}
/**
@@ -54,7 +54,7 @@ class BlockUserInfo extends Module
* @param array $params Parameters
* @return string Content
*/
public function hookTop($params)
public function hookDisplayTop($params)
{
if (!$this->active)
return;
@@ -71,10 +71,13 @@ class BlockUserInfo extends Module
return $this->display(__FILE__, 'blockuserinfo.tpl');
}
public function hookHeader($params)
public function hookDisplayHeader($params)
{
$this->context->controller->addCSS(($this->_path).'blockuserinfo.css', 'all');
}
}
public function hookDisplayNav($params)
{
return $this->display(__FILE__, 'nav.tpl');
}
}