本文整理汇总了PHP中Configuration::updateGlobalValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::updateGlobalValue方法的具体用法?PHP Configuration::updateGlobalValue怎么用?PHP Configuration::updateGlobalValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration::updateGlobalValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: upgrade_module_1_2_2_5
function upgrade_module_1_2_2_5($object)
{
Configuration::updateGlobalValue('PH_BLOG_COMMENT_STUFF_HIGHLIGHT', 1);
Configuration::updateGlobalValue('PH_BLOG_COMMENT_ALLOW', 0);
Configuration::updateGlobalValue('PH_BLOG_COMMENT_NOTIFY_EMAIL', Configuration::get('PS_SHOP_EMAIL'));
return true;
}
示例2: install
public function install($keep = true)
{
if ($keep) {
if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
return false;
} else {
if (!($sql = file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
return false;
}
}
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
$sql = preg_split("/;\\s*[\r\n]+/", trim($sql));
foreach ($sql as $query) {
if (!DB::getInstance()->execute(trim($query))) {
return false;
}
}
}
if (!parent::install() || !$this->registerHook('displayHeader') || !$this->registerHook('displayGroupFashions') || !$this->registerHook('actionProductAdd') || !$this->registerHook('actionProductAttributeDelete') || !$this->registerHook('actionProductAttributeUpdate') || !$this->registerHook('actionProductDelete') || !$this->registerHook('actionProductSave') || !$this->registerHook('actionProductUpdate') || !$this->registerHook('actionCartSave') || !$this->registerHook('actionCategoryAdd') || !$this->registerHook('actionCategoryDelete') || !$this->registerHook('displayGroupFoods') || !$this->registerHook('displayGroupSports')) {
return false;
}
if (!Configuration::updateGlobalValue('MOD_GROUP_CATEGORY', '1')) {
return false;
}
//$this->cache->cleanup();
$this->clearCache();
$this->moduleUpdatePosition();
return true;
}
示例3: upgrade_module_1_2_2_6
function upgrade_module_1_2_2_6($object)
{
Configuration::updateGlobalValue('PH_BLOG_FACEBOOK_MODERATOR', '');
Configuration::updateGlobalValue('PH_BLOG_FACEBOOK_APP_ID', '');
Configuration::updateGlobalValue('PH_BLOG_FACEBOOK_COLOR_SCHEME', 'light');
return true;
}
示例4: install
public function install()
{
Configuration::updateGlobalValue('smartpostperpage', '5');
Configuration::updateGlobalValue('smartshowauthorstyle', '1');
Configuration::updateGlobalValue('smartmainblogurl', 'smartblog');
Configuration::updateGlobalValue('smartusehtml', '1');
Configuration::updateGlobalValue('smartshowauthorstyle', '1');
Configuration::updateGlobalValue('smartenablecomment', '1');
Configuration::updateGlobalValue('smartcaptchaoption', '1');
Configuration::updateGlobalValue('smartshowviewed', '1');
Configuration::updateGlobalValue('smartshownoimg', '1');
Configuration::updateGlobalValue('smartshowcolumn', '3');
Configuration::updateGlobalValue('smartacceptcomment', '1');
Configuration::updateGlobalValue('smartcustomcss', '');
Configuration::updateGlobalValue('smartdisablecatimg', '1');
Configuration::updateGlobalValue('smartblogmetatitle', 'Smart Bolg Title');
Configuration::updateGlobalValue('smartblogmetakeyword', 'smart,blog,smartblog,prestashop blog,prestashop,blog');
Configuration::updateGlobalValue('smartblogmetadescrip', 'Prestashop powerfull blog site developing module. It has hundrade of extra plugins. This module developed by SmartDataSoft.com');
$this->addquickaccess();
$langs = Language::getLanguages();
if (!parent::install() || !$this->registerHook('displayHeader') || !$this->SmartHookInsert() || !$this->registerHook('moduleRoutes') || !$this->registerHook('displayBackOfficeHeader')) {
return false;
}
$sql = array();
require_once dirname(__FILE__) . '/sql/install.php';
foreach ($sql as $sq) {
if (!Db::getInstance()->Execute($sq)) {
return false;
}
}
$this->CreateSmartBlogTabs();
$this->SampleDataInstall();
return true;
}
示例5: uninstall
public function uninstall()
{
if (!parent::uninstall() || !$this->uninstallTab() || !$this->uninstallDb() || !Configuration::updateGlobalValue('GF_CURRENT_LEVEL', 1) || !Configuration::updateGlobalValue('GF_NOTIFICATION', 0) || !Configuration::updateGlobalValue('GF_INSTALL_CALC', 0) || !Configuration::updateGlobalValue('GF_CURRENT_LEVEL_PERCENT', 0)) {
return false;
}
return true;
}
示例6: install
public function install($keep = true)
{
if (!parent::install()) {
return false;
}
if (!Configuration::updateGlobalValue('MOD_VERTICAL_MEGA_MENUS', '1')) {
return false;
}
if (!$this->registerHook('displayHeader') || !$this->registerHook('displayVerticalMenu')) {
return false;
}
if ($keep) {
if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
return false;
} else {
if (!($sql = file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
return false;
}
}
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
$sql = preg_split("/;\\s*[\r\n]+/", trim($sql));
foreach ($sql as $query) {
if (!DB::getInstance()->execute(trim($query))) {
return false;
}
}
}
$this->moduleUpdatePosition();
return true;
}
示例7: updateGlobalValue
public static function updateGlobalValue($key, $values, $html = false)
{
ConfigurationKPI::setKpiDefinition();
$r = parent::updateGlobalValue($key, $values, $html);
ConfigurationKPI::unsetKpiDefinition();
return $r;
}
示例8: install
public function install($keep = true)
{
if ($keep) {
if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
return false;
} else {
if (!($sql = file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
return false;
}
}
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
$sql = preg_split("/;\\s*[\r\n]+/", trim($sql));
foreach ($sql as $query) {
if (!Db::getInstance()->execute(trim($query))) {
return false;
}
}
}
if (!parent::install() || !$this->registerHook('displayHomeTopColumn') || !$this->registerHook('displayHome') || !$this->registerHook('displayLeftColumn') || !$this->registerHook('displayRightColumn') || !$this->registerHook('displayHeader') || !$this->registerHook('displayHomeBottomColumn')) {
return false;
}
if (!Configuration::updateGlobalValue('FLEX_BANNER', '1')) {
return false;
}
$this->importSameData();
return true;
}
示例9: install
public function install()
{
if (!parent::install() || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_HOME', '1') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->registerHook('displayNavigationBar') || !$this->installDB()) {
return false;
}
return true;
}
示例10: install
public function install()
{
if (!parent::install() || !$this->registerHook('displayTop') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT3,CAT26') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_SEARCH', '1') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCategoryAddAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectCmsAddAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectSupplierAddAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectManufacturerAddAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->installDB()) {
return false;
}
return true;
}
示例11: install
public function install($keep = true)
{
if ($keep) {
if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
return false;
} else {
if (!($sql = file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
return false;
}
}
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
$sql = preg_split("/;\\s*[\r\n]+/", trim($sql));
foreach ($sql as $query) {
if (!DB::getInstance()->execute(trim($query))) {
return false;
}
}
}
if (!parent::install() || !$this->registerHook('displayHeader') || !$this->registerHook('displayCustomBanner1') || !$this->registerHook('displayCustomBanner2') || !$this->registerHook('displayCustomBanner3') || !$this->registerHook('displayGroupFashions') || !$this->registerHook('displayGroupFoods') || !$this->registerHook('displayGroupSports')) {
return false;
}
if (!Configuration::updateGlobalValue('MOD_CUSTOM_BANNER', '1')) {
return false;
}
$this->clearCache();
$this->moduleUpdatePosition();
return true;
}
示例12: install
public function install()
{
if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('displaySmartBlogLeft') || !$this->registerHook('actionsbdeletepost') || !$this->registerHook('actionsbnewpost') || !$this->registerHook('actionsbupdatepost') || !$this->registerHook('actionsbtogglepost')) {
return false;
}
Configuration::updateGlobalValue('smartshowrecentpost', 5);
return true;
}
示例13: updateConfiguration
/**
* Update configuration
* @var string Configuration key
* @var mixed Configuration value
* @var boolean If is global configuration
*/
public static function updateConfiguration($key, $value, $global = false)
{
if (version_compare(_PS_VERSION_, '1.5', '>=') && $global) {
Configuration::updateGlobalValue($key, $value);
} else {
Configuration::updateValue($key, $value);
}
}
示例14: upgrade_module_1_3_1_9
function upgrade_module_1_3_1_9($object)
{
Configuration::updateGlobalValue('PH_BLOG_LOAD_FONT_AWESOME', 1);
Configuration::updateGlobalValue('PH_BLOG_LOAD_BXSLIDER', 1);
Configuration::updateGlobalValue('PH_BLOG_LOAD_MASONRY', 1);
Configuration::updateGlobalValue('PH_BLOG_LOAD_FITVIDS', 1);
return true;
}
示例15: upgrade_module_1_4_0
function upgrade_module_1_4_0($object)
{
if (Configuration::get('PH_BLOG_NATIVE_COMMENTS')) {
Configuration::updateGlobalValue('PH_BLOG_COMMENTS_SYSTEM', 'native');
} else {
Configuration::updateGlobalValue('PH_BLOG_COMMENTS_SYSTEM', 'facebook');
}
return true;
}