本文整理汇总了PHP中ObjectModel::save方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectModel::save方法的具体用法?PHP ObjectModel::save怎么用?PHP ObjectModel::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectModel
的用法示例。
在下文中一共展示了ObjectModel::save方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save($nullValues = false, $autodate = true)
{
parent::save($nullValues, $autodate);
if (isset($this->wanted_cart_id)) {
Db::getInstance()->Execute('UPDATE ' . _DB_PREFIX_ . $this->table . ' SET ' . $this->identifier . ' = ' . (int) $this->wanted_cart_id . ' WHERE ' . $this->identifier . ' = ' . (int) $this->id);
$this->id = (int) $this->wanted_cart_id;
unset($this->wanted_cart_id);
}
}
示例2: save
public function save($nullValues = false, $autodate = true)
{
if (!$this->id && $this->criterion_group_type == 'price') {
$this->display_type = 5;
}
$ret = parent::save($nullValues, $autodate);
return $ret;
}
示例3: save
public function save($nullValues = true, $autodate = true)
{
return parent::save($nullValues, $autodate);
}
示例4: save
public function save($nullValues = false, $autodate = true)
{
parent::save($nullValues, $autodate);
$this->historize();
}
示例5: save
public function save($nullValues = false, $autodate = true)
{
$newCriteria = array();
if (!preg_match('#\\{i:#', $this->criteria)) {
$criteria = explode(',', $this->criteria);
if (sizeof($criteria)) {
foreach ($criteria as $k => $value) {
$newCriteria[] = preg_replace('/^biscriterion_/', '', $value);
}
$this->criteria = serialize($newCriteria);
}
}
if ($this->id) {
$this->cleanCrossLinks();
}
if (!$this->id_currency) {
$this->id_currency = Configuration::get('PS_CURRENCY_DEFAULT');
}
$ret = parent::save($nullValues, $autodate);
if (is_array($this->cross_links) && sizeof($this->cross_links)) {
$this->saveCrossLinks();
}
return $ret;
}
示例6: save
public function save($null_values = false, $autodate = true)
{
self::$_getIdFromClassName = null;
return parent::save();
}
示例7: save
public function save($null_values = false, $autodate = true)
{
$saveResult = parent::save($null_values, $autodate);
if ($saveResult) {
self::populateCriterionsLink((int) $this->id_search, $this->id, $this->id_criterion_linked);
self::addCriterionToList((int) $this->id_search, $this->id, $this->id);
}
return $saveResult;
}
示例8: save
public function save($nullValues = true, $autodate = false)
{
if ($this->step_search) {
$this->collapsable_criterias = 0;
$this->reset_group = 0;
}
if ($this->id_hook != 8 && $this->id_hook != -1) {
$this->insert_in_center_column = 0;
}
if (!$this->filter_by_emplacement) {
$this->id_category_root = 0;
}
$ret = parent::save($nullValues, $autodate);
if (Tools::getIsset('categories_association')) {
$this->addAssociations(Tools::getValue('categories_association'), 'pm_advancedsearch_category', 'id_category');
} else {
if (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_category');
}
}
if (Tools::getIsset('cms_association')) {
$this->addAssociations(Tools::getValue('cms_association'), 'pm_advancedsearch_cms', 'id_cms');
} elseif (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_cms');
}
if (Tools::getIsset('products_association')) {
$this->addAssociations(Tools::getValue('products_association'), 'pm_advancedsearch_products', 'id_product');
} elseif (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_products');
}
if (Tools::getIsset('manufacturers_association')) {
$this->addAssociations(Tools::getValue('manufacturers_association'), 'pm_advancedsearch_manufacturers', 'id_manufacturer');
} elseif (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_manufacturers');
}
if (Tools::getIsset('suppliers_association')) {
$this->addAssociations(Tools::getValue('suppliers_association'), 'pm_advancedsearch_suppliers', 'id_supplier');
} elseif (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_suppliers');
}
if (Tools::getIsset('special_pages_association')) {
$this->addAssociations(Tools::getValue('special_pages_association'), 'pm_advancedsearch_special_pages', 'page');
} elseif (Tools::isSubmit('submitSearch')) {
$this->cleanAssociation('pm_advancedsearch_special_pages');
}
return $ret;
}
示例9: save
/**
* Saves current object to database (add or update)
* @param bool $null_values
* @param bool $auto_date
*
* @return bool Insertion result
* @throws PrestaShopException
*/
public function save($null_values = true, $auto_date = true)
{
$this->register_date = DotpayCreditCard::reverseDate($this->register_date);
if ($this->hash == NULL) {
$hash = $this->getUniqueCardHash();
if ($hash) {
$this->hash = $hash;
} else {
return false;
}
}
return parent::save($null_values, $auto_date);
}