[*] FO : Move header modules to new hook, first part 1/2
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user