[*] PROJECT : New Module API (part 1)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9790 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+2
-2
@@ -244,7 +244,7 @@ if (Tools::isSubmit('ajaxCategoriesPositions'))
|
||||
{
|
||||
if (isset($position) && $category->updatePosition($way, $position))
|
||||
{
|
||||
Module::hookExec('categoryUpdate');
|
||||
Hook::exec('categoryUpdate');
|
||||
die(true);
|
||||
}
|
||||
else
|
||||
@@ -605,7 +605,7 @@ if (Tools::isSubmit('getHookableModuleList'))
|
||||
include_once(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php');
|
||||
$mod = new $module['name']();
|
||||
if ($mod->isHookableOn($hook_name))
|
||||
$hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Module::hookExec($hook_name, array(), (int)$mod->id));
|
||||
$hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Hook::exec($hook_name, array(), (int)$mod->id));
|
||||
}
|
||||
}
|
||||
die(Tools::jsonEncode($hookableModulesList));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
echo ' </div>
|
||||
</div>
|
||||
'.Module::hookExec('backOfficeFooter').'
|
||||
'.Hook::exec('backOfficeFooter').'
|
||||
<div id="footer">
|
||||
<div style="float:left;margin-left:10px;padding-top:6px">
|
||||
<a href="http://www.prestashop.com/" target="_blank" style="font-weight:700;color:#666666">PrestaShop™ '._PS_VERSION_.'</a><br />
|
||||
|
||||
@@ -54,7 +54,7 @@ echo '
|
||||
<script type="text/javascript" src="'._PS_JS_DIR_.'tools.js"></script>
|
||||
<script type="text/javascript" src="'._PS_JS_DIR_.'ajax.js"></script>
|
||||
<link rel="shortcut icon" href="'._PS_IMG_.'favicon.ico" />
|
||||
'.Module::hookExec('backOfficeHeader').'
|
||||
'.Hook::exec('backOfficeHeader').'
|
||||
<!--[if IE]>
|
||||
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'admin-ie.css" />
|
||||
<![endif]-->
|
||||
@@ -272,7 +272,7 @@ echo ' </select>
|
||||
echo '<div id="header_shoplist">'.translate('Select your shop:').' '.generateShopList().'</div>';
|
||||
|
||||
echo '<div class="flatclear"> </div>';
|
||||
echo Module::hookExec('backOfficeTop');
|
||||
echo Hook::exec('backOfficeTop');
|
||||
echo '<ul id="menu">';
|
||||
|
||||
if (empty($tab))
|
||||
|
||||
@@ -211,7 +211,7 @@ class AdminFeatures extends AdminTab
|
||||
echo '</div>';
|
||||
}
|
||||
echo '
|
||||
'.Module::hookExec('featureForm', array('id_feature' => $obj->id)).'
|
||||
'.Hook::exec('featureForm', array('id_feature' => $obj->id)).'
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
|
||||
</div>
|
||||
@@ -236,7 +236,7 @@ class AdminFeatures extends AdminTab
|
||||
if (Tools::isSubmit('submitAddfeature_value') || Tools::isSubmit('submitDelfeature_value'))
|
||||
$this->adminFeaturesValues->postProcess($this->token);
|
||||
|
||||
Module::hookExec('postProcessFeature',
|
||||
Hook::exec('postProcessFeature',
|
||||
array('errors' => &$this->_errors)); // send _errors as reference to allow postProcessFeature to stop saving process
|
||||
|
||||
if(Tools::getValue('submitDel'.$this->table))
|
||||
|
||||
@@ -84,7 +84,7 @@ class AdminFeaturesValues extends AdminTab
|
||||
echo '
|
||||
</select><sup> *</sup>
|
||||
</div>
|
||||
'.Module::hookExec('featureValueForm', array('id_feature_value' => $obj->id)).'
|
||||
'.Hook::exec('featureValueForm', array('id_feature_value' => $obj->id)).'
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@ class AdminFeaturesValues extends AdminTab
|
||||
*/
|
||||
public function postProcess($token = NULL)
|
||||
{
|
||||
Module::hookExec('postProcessFeatureValue',
|
||||
Hook::exec('postProcessFeatureValue',
|
||||
array('errors' => &$this->_errors)); // send _errors as reference to allow postProcessFeatureValue to stop saving process
|
||||
|
||||
if(Tools::getValue('submitDel'.$this->table))
|
||||
@@ -121,4 +121,4 @@ class AdminFeaturesValues extends AdminTab
|
||||
else
|
||||
parent::postProcess();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ class AdminImport extends AdminTab
|
||||
foreach ($imagesTypes AS $k => $imageType)
|
||||
imageResize($tmpfile, $path.'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']);
|
||||
if (in_array($imageType['id_image_type'], $watermark_types))
|
||||
Module::hookExec('watermark', array('id_image' => $id_image, 'id_product' => $id_entity));
|
||||
Hook::exec('watermark', array('id_image' => $id_image, 'id_product' => $id_entity));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1864,4 +1864,4 @@ class AdminImport extends AdminTab
|
||||
{
|
||||
$this->_warnings[] = $product_name.(isset($product_id) ? ' (ID '.$product_id.')' : '').' '.Tools::displayError($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ abstract class AdminStatsTab extends AdminPreferences
|
||||
if (!isset($moduleInstance))
|
||||
$moduleInstance = Module::getInstanceByName($moduleName);
|
||||
if ($moduleInstance AND $moduleInstance->active)
|
||||
echo Module::hookExec('AdminStatsModules', NULL, $moduleInstance->id);
|
||||
echo Hook::exec('AdminStatsModules', NULL, $moduleInstance->id);
|
||||
else
|
||||
echo $this->l('Module not found', 'AdminStatsTab');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user