當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Configuration::getIdByName方法代碼示例

本文整理匯總了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;
 }
開發者ID:prestanesia,項目名稱:PrestaShop,代碼行數:7,代碼來源:ConfigurationKPI.php

示例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;
    }
開發者ID:rrameshsat,項目名稱:Prestashop,代碼行數:24,代碼來源:Configuration.php

示例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;
    }
開發者ID:dev-lav,項目名稱:htdocs,代碼行數:24,代碼來源:Configuration.php


注:本文中的Configuration::getIdByName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。