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


PHP JModelLegacy::add方法代码示例

本文整理汇总了PHP中JModelLegacy::add方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelLegacy::add方法的具体用法?PHP JModelLegacy::add怎么用?PHP JModelLegacy::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JModelLegacy的用法示例。


在下文中一共展示了JModelLegacy::add方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add

 public function add($autodate = true, $nullValues = false)
 {
     if (parent::add($autodate, $nullValues)) {
         Hook::exec('actionPaymentCCAdd', array('paymentCC' => $this));
         return true;
     }
     return false;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:8,代码来源:order.php

示例2: add

 public function add($autodate = true, $nullValues = false)
 {
     if ($this->group_type == 'color') {
         $this->is_color_group = 1;
     } else {
         $this->is_color_group = 0;
     }
     if ($this->position <= 0) {
         $this->position = AttributeGroup::getHigherPosition() + 1;
     }
     $return = parent::add($autodate, true);
     Hook::exec('actionAttributeGroupSave', array('id_attribute_group' => $this->id));
     return $return;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:14,代码来源:attribute.php

示例3: add

 public function add($autodate = true, $null_values = false)
 {
     if (!parent::add($autodate, $null_values)) {
         return false;
     }
     $product = new Product((int) $this->id_product);
     if ($product->getType() == Product::PTYPE_VIRTUAL) {
         StockAvailable::setProductOutOfStock((int) $this->id_product, 1, null, (int) $this->id);
     } else {
         StockAvailable::setProductOutOfStock((int) $this->id_product, StockAvailable::outOfStock((int) $this->id_product), null, $this->id);
     }
     SpecificPriceRule::applyAllRules(array((int) $this->id_product));
     Product::updateDefaultAttribute($this->id_product);
     return true;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:15,代码来源:combination.php

示例4: add

 public function add($autodate = true, $null_values = false)
 {
     $this->file_size = filesize(_PS_DOWNLOAD_DIR_ . $this->file);
     return parent::add($autodate, $null_values);
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:5,代码来源:attachment.php

示例5: add

 /**
  * @see ObjectModel::add()
  */
 public function add()
 {
     $db = JFactory::getDBO();
     $this->date_add = date('Y-m-d H:i:s');
     $this->date_upd = date('Y-m-d H:i:s');
     if (JeproshopShopModelShop::isTableAssociated('address')) {
         $shopListIds = JeproshopShopModelShop::getContextListShopIds();
         if (count($this->shop_list_id) > 0) {
             $shopListIds = $this->shop_list_id;
         }
     }
     if (JeproshopShopModelShop::checkDefaultShopId('address')) {
         $this->default_shop_id = min($shopListIds);
     }
     $query = "INSERT INTO " . $db->quoteName('#__jeproshop_address');
     if (!parent::add($autodate, $null_values)) {
         return false;
     }
     if (JeproshopTools::isUnsignedInt($this->customer_id)) {
         JeproshopCustomerModelCustomer::resetAddressCache($this->customer_id);
     }
     return true;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:26,代码来源:address.php

示例6: add

 public function add($autodate = true, $null_values = false)
 {
     if ($this->position <= 0) {
         $this->position = Carrier::getHigherPosition() + 1;
     }
     if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this)) {
         return false;
     }
     if (!($count = Db::getInstance()->getValue('SELECT count(`id_carrier`) FROM `' . _DB_PREFIX_ . $this->def['table'] . '` WHERE `deleted` = 0'))) {
         return false;
     }
     if ($count == 1) {
         Configuration::updateValue('PS_CARRIER_DEFAULT', (int) $this->id);
     }
     // Register reference
     Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . $this->def['table'] . '` SET `id_reference` = ' . $this->id . ' WHERE `id_carrier` = ' . $this->id);
     return true;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:18,代码来源:carrier.php

示例7: add

 /**
  * @see ObjectModel::add()
  */
 public function add($autodate = true, $null_values = false)
 {
     if (!parent::add($autodate, $null_values)) {
         return false;
     }
     Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1');
     return true;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:11,代码来源:cart.php

示例8: add

 public function add($autodate = true, $null_values = false)
 {
     return parent::add($autodate, $null_values) && $this->_setCache();
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:4,代码来源:group.php

示例9: add

 /**
  * Overriding check if currency rate is not empty and if currency with the same iso code already exists.
  * If it's true, currency is not added.
  *
  * @see ObjectModelCore::add()
  */
 public function add()
 {
     if ((double) $this->conversion_rate <= 0) {
         return false;
     }
     if (JeproshopCurrencyModelCurrency::exists($this->iso_code, $this->iso_code_num)) {
         return false;
     } else {
         return parent::add($autodate, $nullValues);
     }
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:17,代码来源:currency.php

示例10: add

 public function add($autodate = true, $null_values = false)
 {
     $return = parent::add($autodate, $null_values) && self::addModuleRestrictions(array(), array(array('id_country' => $this->id)), array());
     return $return;
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:5,代码来源:country.php

示例11: add

 public function add($autodate = true, $null_values = true)
 {
     $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-' . Configuration::get('PS_PASSWD_TIME_BACK') . 'minutes'));
     $this->saveOptin();
     $this->updateTextDirection();
     return parent::add($autodate, $null_values);
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:7,代码来源:employee.php

示例12: add

 public function add($autodate = true, $null_values = false)
 {
     $db = JFactory::getDBO();
     $this->date_add = date('Y-m-d H:i:s');
     if (isset($this->product_download_id) && !$this->force_id) {
         unset($this->product_download_id);
     }
     return (bool) parent::add($autodate, $null_values);
 }
开发者ID:jeprodev,项目名称:jeproshop,代码行数:9,代码来源:product.php


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