本文整理汇总了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');
}
}