/** * Delete configuration key from current context. * * @param string $key */ public static function deleteFromContext($key) { if (Shop::getContext() == Shop::CONTEXT_ALL) { return; } $idShop = null; $idShopGroup = Shop::getContextShopGroupID(true); if (Shop::getContext() == Shop::CONTEXT_SHOP) { $idShop = Shop::getContextShopID(true); } $id = Configuration::getIdByName($key, $idShopGroup, $idShop); Db::getInstance()->execute(' DELETE FROM `' . _DB_PREFIX_ . bqSQL(self::$definition['table']) . '` WHERE `' . bqSQL(self::$definition['primary']) . '` = ' . (int) $id); Db::getInstance()->execute(' DELETE FROM `' . _DB_PREFIX_ . bqSQL(self::$definition['table']) . '_lang` WHERE `' . bqSQL(self::$definition['primary']) . '` = ' . (int) $id); self::$_cache = null; self::$_new_cache_shop = null; self::$_new_cache_group = null; self::$_new_cache_global = null; self::$_initialized = false; }