本文整理匯總了PHP中Configuration::getIdByName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Configuration::getIdByName方法的具體用法?PHP Configuration::getIdByName怎麽用?PHP Configuration::getIdByName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Configuration
的用法示例。
在下文中一共展示了Configuration::getIdByName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getIdByName
public static function getIdByName($key, $id_shop_group = null, $id_shop = null)
{
ConfigurationKPI::setKpiDefinition();
$r = parent::getIdByName($key, $id_shop_group, $id_shop);
ConfigurationKPI::unsetKpiDefinition();
return $r;
}
示例2: deleteFromContext
/**
* Delete configuration key from current context.
*
* @param string $key
*/
public static function deleteFromContext($key)
{
if (Shop::getContext() == Shop::CONTEXT_ALL) {
return;
}
$id_shop = null;
$id_shop_group = Shop::getContextShopGroupID(true);
if (Shop::getContext() == Shop::CONTEXT_SHOP) {
$id_shop = Shop::getContextShopID(true);
}
$id = Configuration::getIdByName($key, $id_shop_group, $id_shop);
Db::getInstance()->execute('
DELETE FROM ' . _DB_PREFIX_ . 'configuration
WHERE id_configuration = ' . (int) $id);
Db::getInstance()->execute('
DELETE FROM ' . _DB_PREFIX_ . 'configuration_lang
WHERE id_configuration = ' . (int) $id);
self::$_CONF = null;
}
示例3: deleteFromContext
/**
* Delete configuration key from current context.
*
* @param string $key
*/
public static function deleteFromContext($key)
{
if (Shop::getContext() == Shop::CONTEXT_ALL) {
return;
}
$id_shop = null;
$id_shop_group = Shop::getContextShopGroupID(true);
if (Shop::getContext() == Shop::CONTEXT_SHOP) {
$id_shop = Shop::getContextShopID(true);
}
$id = Configuration::getIdByName($key, $id_shop_group, $id_shop);
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[self::$definition['table']] = null;
}