當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。