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


PHP AbstractExtensibleModel::afterSave方法代码示例

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


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

示例1: afterSave

 /**
  * After save process
  *
  * @return $this
  */
 public function afterSave()
 {
     parent::afterSave();
     $this->_getResource()->saveLabel($this);
     $this->_getResource()->savePrices($this);
     return $this;
 }
开发者ID:opexsw,项目名称:magento2,代码行数:12,代码来源:Attribute.php

示例2: afterSave

 /**
  * @return \Magento\Framework\Model\AbstractModel
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 public function afterSave()
 {
     $this->getValueInstance()->unsetValues();
     if (is_array($this->getData('values'))) {
         foreach ($this->getData('values') as $value) {
             $this->getValueInstance()->addValue($value);
         }
         $this->getValueInstance()->setOption($this)->saveValues();
     } elseif ($this->getGroupByType($this->getType()) == self::OPTION_GROUP_SELECT) {
         throw new LocalizedException(__('Select type options required values rows.'));
     }
     return parent::afterSave();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:17,代码来源:Option.php

示例3: afterSave

 /**
  * After save process
  *
  * @return $this
  */
 public function afterSave()
 {
     $this->getResource()->saveItemTitle($this);
     return parent::afterSave();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:10,代码来源:Sample.php

示例4: afterSave

 /**
  * After save rule
  * Re-declared for populate rate calculations
  *
  * @return $this
  */
 public function afterSave()
 {
     parent::afterSave();
     $this->saveCalculationData();
     $this->_eventManager->dispatch('tax_settings_change_after');
     return $this;
 }
开发者ID:opexsw,项目名称:magento2,代码行数:13,代码来源:Rule.php

示例5: afterSave

 /**
  * Save related items
  *
  * @return $this
  */
 public function afterSave()
 {
     parent::afterSave();
     if (null !== $this->_addresses) {
         $this->getAddressesCollection()->save();
     }
     if (null !== $this->_items) {
         $this->getItemsCollection()->save();
     }
     if (null !== $this->_payments) {
         $this->getPaymentsCollection()->save();
     }
     if (null !== $this->_currentPayment) {
         $this->getPayment()->save();
     }
     return $this;
 }
开发者ID:kid17,项目名称:magento2,代码行数:22,代码来源:Quote.php

示例6: afterSave

 /**
  * Save rate titles
  *
  * @return \Magento\Tax\Model\Calculation\Rate
  */
 public function afterSave()
 {
     $this->saveTitles();
     $this->_eventManager->dispatch('tax_settings_change_after');
     return parent::afterSave();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:Rate.php

示例7: afterSave

 /**
  * @return \Magento\Framework\Model\AbstractModel
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 public function afterSave()
 {
     $this->getValueInstance()->unsetValues();
     $values = $this->getValues() ?: $this->getData('values');
     if (is_array($values)) {
         foreach ($values as $value) {
             if ($value instanceof \Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface) {
                 $data = $value->getData();
             } else {
                 $data = $value;
             }
             $this->getValueInstance()->addValue($data);
         }
         $this->getValueInstance()->setOption($this)->saveValues();
     } elseif ($this->getGroupByType($this->getType()) == self::OPTION_GROUP_SELECT) {
         throw new LocalizedException(__('Select type options required values rows.'));
     }
     return parent::afterSave();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:23,代码来源:Option.php


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