Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * The "After save" actions
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if ($this->_oauthData->isCleanupProbability()) {
         $this->getResource()->deleteOldEntries($this->_oauthData->getCleanupExpirationPeriod());
     }
     return $this;
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
 /**
  * Save related items
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if (null !== $this->_itemCollection) {
         $this->getItemCollection()->save();
     }
     return $this;
 }
Exemplo n.º 5
0
 /**
  * Reindex CatalogInventory save event
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     if ($this->_processIndexEvents) {
         $this->_stockIndexerProcessor->reindexRow($this->getProductId());
     }
     return $this;
 }
Exemplo n.º 6
0
 /**
  * Process data after model is saved
  *
  * @return $this
  */
 protected function _afterSave()
 {
     $this->_role = null;
     return parent::_afterSave();
 }
Exemplo n.º 7
0
 /**
  * After save process
  *
  * @return $this
  */
 protected function _afterSave()
 {
     $this->getResource()->saveItemTitle($this);
     return parent::_afterSave();
 }
Exemplo n.º 8
0
 /**
  * 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;
 }
Exemplo n.º 9
0
 /**
  * After object save
  *
  * @return $this
  */
 protected function _afterSave()
 {
     if (null == !$this->_orderItem) {
         $this->_orderItem->save();
     }
     parent::_afterSave();
     return $this;
 }
Exemplo n.º 10
0
 /**
  * After save process
  *
  * @return $this
  */
 protected function _afterSave()
 {
     parent::_afterSave();
     $this->_getResource()->saveLabel($this);
     $this->_getResource()->savePrices($this);
     return $this;
 }
Exemplo n.º 11
0
 /**
  * Save rate titles
  *
  * @return \Magento\Tax\Model\Calculation\Rate
  */
 protected function _afterSave()
 {
     $this->saveTitles();
     $this->_eventManager->dispatch('tax_settings_change_after');
     return parent::_afterSave();
 }
Exemplo n.º 12
0
 /**
  * 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();
 }
Exemplo n.º 13
0
 /**
  * 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;
 }
Exemplo n.º 14
0
 /**
  * {@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();
 }
Exemplo n.º 15
0
 /**
  * @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();
 }
Exemplo n.º 16
0
 /**
  * Save item options after item saved
  *
  * @return $this
  */
 protected function _afterSave()
 {
     $this->_saveItemOptions();
     return parent::_afterSave();
 }
Exemplo n.º 17
0
 /**
  * Processing object before save data
  *
  * @return $this
  */
 protected function _afterSave()
 {
     if (!$this->_catalogData->isPriceGlobal() && $this->getWebsiteId()) {
         $this->getResource()->saveSelectionPrice($this);
         if (!$this->getDefaultPriceScope()) {
             $this->unsSelectionPriceValue();
             $this->unsSelectionPriceType();
         }
     }
     parent::_afterSave();
 }