本文整理匯總了PHP中Hook::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Hook::delete方法的具體用法?PHP Hook::delete怎麽用?PHP Hook::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Hook
的用法示例。
在下文中一共展示了Hook::delete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SmartHookDelete
public function SmartHookDelete()
{
$hookvalue = array();
require_once dirname(__FILE__) . '/sql/addhook.php';
foreach ($hookvalue as $hkv) {
$hookid = Hook::getIdByName($hkv['name']);
if ($hookid) {
$dlt_hook = new Hook($hookid);
$dlt_hook->delete();
}
}
}
示例2: _revertInstall
protected function _revertInstall($step)
{
if ($step >= 1) {
$hook = new Hook(Hook::getIdByName('actionBeforeAddOrder'));
$hook->delete();
unset($hook);
}
if ($step >= 2) {
$hook2 = new Hook(Hook::getIdByName('actionBeforeAddOrderInvoice'));
$hook2->delete();
unset($hook2);
}
if ($step >= 3) {
$hook3 = new Hook(Hook::getIdByName('actionBeforeAddDeliveryNumber'));
$hook3->delete();
unset($hook3);
}
// if($step >= 4)
// Uninstall DB changes
if ($step >= 5) {
parent::uninstall;
}
if ($step >= 6) {
$this->uninstallXtraOverrides();
}
if ($step >= 7) {
$this->unregisterHook('actionBeforeAddOrder');
}
if ($step >= 8) {
$this->unregisterHook('actionBeforeAddOrderInvoice');
}
if ($step >= 9) {
$this->unregisterHook('actionBeforeAddDeliveryNumber');
}
if ($step >= 10) {
Configuration::deleteByName('ORD_REF_ORDERID');
}
if ($step >= 11) {
Configuration::deleteByName('ORD_REF_PREFIXNULO');
}
if ($step >= 12) {
Configuration::deleteByName('ORD_REF_PREFIXNULNRO');
}
if ($step >= 13) {
Configuration::deleteByName('ORD_REF_PREFIXNULNRC');
}
if ($step >= 14) {
Configuration::deleteByName('ORD_REF_PREFIXSIGNO');
}
if ($step >= 15) {
Configuration::deleteByName('ORD_REF_CARTID');
}
if ($step >= 16) {
Configuration::deleteByName('ORD_REF_PREFIXNULC');
}
if ($step >= 17) {
Configuration::deleteByName('ORD_REF_PREFIXSIGNC');
}
if ($step >= 18) {
Configuration::deleteByName('ORD_REF_PREFIXSIGN');
}
if ($step >= 19) {
Configuration::deleteByName('INV_REF_ORDERID');
}
if ($step >= 20) {
Configuration::deleteByName('INV_REF_CARTID');
}
}