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


PHP AbstractDb::_afterDelete方法代码示例

本文整理汇总了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);
 }
开发者ID:razbakov,项目名称:magento2,代码行数:13,代码来源:Consumer.php

示例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;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:23,代码来源:Rating.php

示例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;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:12,代码来源:Option.php

示例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);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:12,代码来源:Instance.php


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