当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectModel::save方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:greench,项目名称:prestashop,代码行数:9,代码来源:dejalacart.php

示例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;
 }
开发者ID:acreno,项目名称:pm-ps,代码行数:8,代码来源:AdvancedSearchCriterionGroupClass.php

示例3: save

 public function save($nullValues = true, $autodate = true)
 {
     return parent::save($nullValues, $autodate);
 }
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:4,代码来源:ReferralProgramModule.php

示例4: save

 public function save($nullValues = false, $autodate = true)
 {
     parent::save($nullValues, $autodate);
     $this->historize();
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:5,代码来源:LoyaltyModule.php

示例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;
 }
开发者ID:acreno,项目名称:pm-ps,代码行数:24,代码来源:AdvancedSearchSeoClass.php

示例6: save

 public function save($null_values = false, $autodate = true)
 {
     self::$_getIdFromClassName = null;
     return parent::save();
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:5,代码来源:Tab.php

示例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;
 }
开发者ID:acreno,项目名称:pm-ps,代码行数:9,代码来源:AdvancedSearchCriterionClass.php

示例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;
 }
开发者ID:acreno,项目名称:pm-ps,代码行数:47,代码来源:AdvancedSearchClass.php

示例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);
 }
开发者ID:dotpay,项目名称:dotpay,代码行数:21,代码来源:CreditCard.php


注:本文中的ObjectModel::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。