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

This commit is contained in:
gRoussac committed 2013-12-11 16:22:33 +01:00
1 parent 472742a42d
commit c574b04a63
97 files changed
+858 -1712

No files matched your search

+13 -7
View File
@@ -33,9 +33,9 @@ class Blockcontact extends Module
{
$this->name = 'blockcontact';
$this->tab = 'front_office_features';
$this->version = '1.0';
$this->version = '1.1';
$this->bootstrap = true;
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Contact Block');
@@ -47,7 +47,7 @@ class Blockcontact extends Module
return parent::install()
&& Configuration::updateValue('blockcontact_telnumber', '')
&& Configuration::updateValue('blockcontact_email', '')
&& $this->registerHook('displayRightColumn')
&& $this->registerHook('displayNav')
&& $this->registerHook('displayHeader');
}
@@ -74,12 +74,12 @@ class Blockcontact extends Module
return $html;
}
public function hookDisplayHeader()
public function hookDisplayHeader($params)
{
$this->context->controller->addCSS(($this->_path).'blockcontact.css', 'all');
}
public function hookDisplayRightColumn()
public function hookDisplayRightColumn($params)
{
global $smarty;
if (!$this->isCached('blockcontact.tpl', $this->getCacheId()))
@@ -90,9 +90,15 @@ class Blockcontact extends Module
return $this->display(__FILE__, 'blockcontact.tpl', $this->getCacheId());
}
public function hookDisplayLeftColumn()
public function hookDisplayLeftColumn($params)
{
return $this->hookDisplayRightColumn();
return $this->hookDisplayRightColumn($params);
}
public function hookDisplayNav($params)
{
return $this->hookDisplayRightColumn($params);
}
public function renderForm()
+1 -1
View File
@@ -2,7 +2,7 @@
<module>
<name>blockcontact</name>
<displayName><![CDATA[Contact Block]]></displayName>
<version><![CDATA[1.0]]></version>
<version><![CDATA[1.1]]></version>
<description><![CDATA[Allows you to add additional information about your store&#039;s customer service.]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[front_office_features]]></tab>
@@ -0,0 +1,9 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
function upgrade_module_1_1($object)
{
return ($object->unregisterHook('displayRightColumn') && $object->registerHook('displayNav'));
}