// same for unregister hook
This commit is contained in:
@@ -49,7 +49,8 @@ class BlockMyAccount extends Module
|
||||
|| !parent::install()
|
||||
|| !$this->registerHook('displayLeftColumn')
|
||||
|| !$this->registerHook('displayHeader')
|
||||
|| !$this->registerHook('actionModuleRegisterHookAfter'))
|
||||
|| !$this->registerHook('actionModuleRegisterHookAfter')
|
||||
|| !$this->registerHook('actionModuleUnRegisterUnHookAfter'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -59,6 +60,11 @@ class BlockMyAccount extends Module
|
||||
return (parent::uninstall() && $this->removeMyAccountBlockHook());
|
||||
}
|
||||
|
||||
public function hookActionUnModuleRegisterHookAfter($params)
|
||||
{
|
||||
return $this->hookActionModuleRegisterHookAfter($params);
|
||||
}
|
||||
|
||||
public function hookActionModuleRegisterHookAfter($params)
|
||||
{
|
||||
if ($params['hook_name'] == 'displayMyAccountBlock')
|
||||
|
||||
@@ -45,11 +45,22 @@ class Blockmyaccountfooter extends Module
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!$this->addMyAccountBlockHook() || !parent::install() || !$this->registerHook('footer') || !$this->registerHook('header') || !$this->registerHook('actionModuleRegisterHookAfter'))
|
||||
if (!$this->addMyAccountBlockHook()
|
||||
|| !parent::install()
|
||||
|| !$this->registerHook('footer')
|
||||
|| !$this->registerHook('header')
|
||||
|| !$this->registerHook('actionModuleRegisterHookAfter')
|
||||
|| !$this->registerHook('actionModuleUnRegisterHookAfter')
|
||||
)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function hookActionUnModuleRegisterHookAfter($params)
|
||||
{
|
||||
return $this->hookActionModuleRegisterHookAfter($params);
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
return parent::uninstall() && $this->removeMyAccountBlockHook();
|
||||
|
||||
Reference in New Issue
Block a user