本文整理汇总了PHP中Magento\Framework\Model\ResourceModel\Db\AbstractDb::_afterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractDb::_afterDelete方法的具体用法?PHP AbstractDb::_afterDelete怎么用?PHP AbstractDb::_afterDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\ResourceModel\Db\AbstractDb
的用法示例。
在下文中一共展示了AbstractDb::_afterDelete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _afterDelete
/**
* Delete all Nonce entries associated with the consumer
*
* @param \Magento\Framework\Model\AbstractModel $object
* @return $this
*/
public function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
{
$connection = $this->getConnection();
$connection->delete($this->getTable('oauth_nonce'), ['consumer_id' => $object->getId()]);
$connection->delete($this->getTable('oauth_token'), ['consumer_id' => $object->getId()]);
return parent::_afterDelete($object);
}
示例2: _afterDelete
/**
* Perform actions after object delete
* Prepare rating data for reaggregate all data for reviews
*
* @param \Magento\Framework\Model\AbstractModel $object
* @return $this
*/
protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
{
parent::_afterDelete($object);
if (!$this->moduleManager->isEnabled('Magento_Review')) {
return $this;
}
$data = $this->_getEntitySummaryData($object);
$summary = [];
foreach ($data as $row) {
$clone = clone $object;
$clone->addData($row);
$summary[$clone->getStoreId()][$clone->getEntityPkValue()] = $clone;
}
$this->_reviewSummary->reAggregate($summary);
return $this;
}
示例3: _afterDelete
/**
* After delete process
*
* @param \Magento\Framework\Model\AbstractModel $object
* @return $this
*/
protected function _afterDelete(\Magento\Framework\Model\AbstractModel $object)
{
parent::_afterDelete($object);
$this->getConnection()->delete($this->getTable('catalog_product_bundle_option_value'), ['option_id = ?' => $object->getId()]);
return $this;
}
示例4: _afterDelete
/**
* Perform actions after object delete.
* Delete layout updates by layout update ids collected in _beforeSave
*
* @param \Magento\Widget\Model\Widget\Instance $object
* @return $this
*/
protected function _afterDelete(AbstractModel $object)
{
$this->_deleteLayoutUpdates($object->getLayoutUpdateIdsToDelete());
return parent::_afterDelete($object);
}