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


PHP AbstractModel::_afterSave方法代码示例

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


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

示例1: _afterSave

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

示例2: _afterSave

 /**
  * The "After save" actions
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if ($this->_oauthData->isCleanupProbability()) {
         $this->getResource()->deleteOldEntries($this->_oauthData->getCleanupExpirationPeriod());
     }
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:Nonce.php

示例3: _afterSave

 /**
  * Save related items
  *
  * @return $this
  */
 protected 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();
     }
     return $this;
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:19,代码来源:Quote.php

示例4: _afterSave

 /**
  * Save related items
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if (null !== $this->_itemCollection) {
         $this->getItemCollection()->save();
     }
     return $this;
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:13,代码来源:Wishlist.php

示例5: _afterSave

 /**
  * Reindex CatalogInventory save event
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if ($this->_processIndexEvents) {
         $this->_stockIndexerProcessor->reindexRow($this->getProductId());
     }
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:Item.php

示例6: _afterSave

 /**
  * Process data after model is saved
  *
  * @return $this
  */
 protected function _afterSave()
 {
     $this->_role = null;
     return parent::_afterSave();
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:10,代码来源:User.php

示例7: _afterSave

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

示例8: _afterSave

 /**
  * Run reindex process after data save
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     $this->_indexer->processEntityAction($this, self::ENTITY, \Magento\Index\Model\Event::TYPE_SAVE);
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:11,代码来源:Group.php

示例9: _afterSave

 /**
  * After object save
  *
  * @return $this
  */
 protected function _afterSave()
 {
     if (null == !$this->_orderItem) {
         $this->_orderItem->save();
     }
     parent::_afterSave();
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:Item.php

示例10: _afterSave

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

示例11: _afterSave

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

示例12: _afterSave

 /**
  * Invalidate related cache if instance contain layout updates
  *
  * @return $this
  */
 protected function _afterSave()
 {
     if ($this->dataHasChangedFor('page_groups') || $this->dataHasChangedFor('widget_parameters')) {
         $this->_invalidateCache();
     }
     return parent::_afterSave();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:Instance.php

示例13: _afterSave

 /**
  * Clean cache for front-end menu
  *
  * @return  $this
  */
 protected function _afterSave()
 {
     if ($this->hasCategoryId()) {
         $this->_cacheTag = array(\Magento\Catalog\Model\Category::CACHE_TAG, \Magento\Store\Model\Group::CACHE_TAG);
     }
     parent::_afterSave();
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:UrlRewrite.php

示例14: _afterSave

 /**
  * {@inheritdoc}
  */
 protected function _afterSave()
 {
     $customerData = (array) $this->getData();
     $customerData[CustomerData::ID] = $this->getId();
     $dataObject = $this->_customerDataBuilder->populateWithArray($customerData)->create();
     $customerOrigData = (array) $this->getOrigData();
     $customerOrigData[CustomerData::ID] = $this->getId();
     $origDataObject = $this->_customerDataBuilder->populateWithArray($customerOrigData)->create();
     $this->_eventManager->dispatch('customer_save_after_data_object', array('customer_data_object' => $dataObject, 'orig_customer_data_object' => $origDataObject));
     return parent::_afterSave();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:14,代码来源:Customer.php

示例15: _afterSave

 /**
  * @return AbstractModel
  * @throws \Magento\Framework\Model\Exception
  */
 protected 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 Exception(__('Select type options required values rows.'));
     }
     return parent::_afterSave();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:17,代码来源:Option.php


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