本文整理汇总了PHP中MagebridgeModelConfig::saveValue方法的典型用法代码示例。如果您正苦于以下问题:PHP MagebridgeModelConfig::saveValue方法的具体用法?PHP MagebridgeModelConfig::saveValue怎么用?PHP MagebridgeModelConfig::saveValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MagebridgeModelConfig
的用法示例。
在下文中一共展示了MagebridgeModelConfig::saveValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
/**
* Method to store the item
*
* @package MageBridge
* @access public
* @param array $data
* @return bool
*/
public function store($data)
{
// Store the item
$rt = parent::store($data);
// Change the setting "load_urls" in the MageBridge configuration
if ($data['published'] == 1) {
MagebridgeModelConfig::saveValue('load_urls', 1);
}
return $rt;
}
示例2: toggleMode
public function toggleMode()
{
// Validate whether this task is allowed
if ($this->_validate() == false) {
return false;
}
// Determine the toggle value
$name = 'advanced';
$value = MagebridgeModelConfig::load($name);
if ($value == 1) {
$value = 0;
} else {
$value = 1;
}
MagebridgeModelConfig::saveValue($name, $value);
$link = 'index.php?option=com_magebridge&view=config';
$this->setRedirect($link);
}
示例3: store
/**
* Method to store the item
*
* @package MageBridge
* @access public
* @param array $data
* @return bool
*/
public function store($data)
{
$row = $this->getTable();
// Bind the form fields to the item table
if (!$row->bind($data)) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// Make sure the item table is valid
if (!$row->check()) {
$this->setError($row->getError());
return false;
}
// Store the item table to the database
if (!$row->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// Change the setting "load_urls" in the MageBridge configuration
if ($data['published'] == 1) {
MagebridgeModelConfig::saveValue('load_urls', 1);
}
// Save the ID for later usage
$this->_id = $row->id;
return true;
}