[+] CORE : added new hook actionModuleInstallBefore and actionModuleInstallAfter

This commit is contained in:
vAugagneur
2013-03-20 17:28:51 +01:00
parent a2362d1d6f
commit ecfb24dad4
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -187,6 +187,7 @@ abstract class ModuleCore
*/ */
public function install() public function install()
{ {
Hook::exec('actionModuleInstallBefore', array('object' => $this));
// Check module name validation // Check module name validation
if (!Validate::isModuleName($this->name)) if (!Validate::isModuleName($this->name))
{ {
@@ -265,7 +266,7 @@ abstract class ModuleCore
// Adding Restrictions for client groups // Adding Restrictions for client groups
Group::addRestrictionsForModule($this->id, Shop::getShops(true, null, true)); Group::addRestrictionsForModule($this->id, Shop::getShops(true, null, true));
Hook::exec('actionModuleInstallAfter', array('object' => $this));
return true; return true;
} }
+6
View File
@@ -265,5 +265,11 @@
<hook id="displayMyAccountBlock" live_edit="0"> <hook id="displayMyAccountBlock" live_edit="0">
<name>displayMyAccountBlock</name><title>My account block</title><description>This hook displays extra information within the 'my account' block"</description> <name>displayMyAccountBlock</name><title>My account block</title><description>This hook displays extra information within the 'my account' block"</description>
</hook> </hook>
<hook id="actionModuleInstallBefore" live_edit="0">
<name>actionModuleInstallBefore</name><title>actionModuleInstallBefore</title><description></description>
</hook>
<hook id="actionModuleInstallAfter" live_edit="0">
<name>actionModuleInstallAfter</name><title>actionModuleInstallAfter</title><description></description>
</hook>
</entities> </entities>
</entity_hook> </entity_hook>