本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: _afterSave
/**
* Save related items
*
* @return $this
*/
protected function _afterSave()
{
parent::_afterSave();
if (null !== $this->_itemCollection) {
$this->getItemCollection()->save();
}
return $this;
}
示例5: _afterSave
/**
* Reindex CatalogInventory save event
*
* @return $this
*/
protected function _afterSave()
{
parent::_afterSave();
if ($this->_processIndexEvents) {
$this->_stockIndexerProcessor->reindexRow($this->getProductId());
}
return $this;
}
示例6: _afterSave
/**
* Process data after model is saved
*
* @return $this
*/
protected function _afterSave()
{
$this->_role = null;
return parent::_afterSave();
}
示例7: _afterSave
/**
* After save process
*
* @return $this
*/
protected function _afterSave()
{
$this->getResource()->saveItemTitle($this);
return parent::_afterSave();
}
示例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;
}
示例9: _afterSave
/**
* After object save
*
* @return $this
*/
protected function _afterSave()
{
if (null == !$this->_orderItem) {
$this->_orderItem->save();
}
parent::_afterSave();
return $this;
}
示例10: _afterSave
/**
* After save process
*
* @return $this
*/
protected function _afterSave()
{
parent::_afterSave();
$this->_getResource()->saveLabel($this);
$this->_getResource()->savePrices($this);
return $this;
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}