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


PHP Mage_Core_Model_Resource_Db_Abstract::_afterDelete方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Resource_Db_Abstract::_afterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Resource_Db_Abstract::_afterDelete方法的具体用法?PHP Mage_Core_Model_Resource_Db_Abstract::_afterDelete怎么用?PHP Mage_Core_Model_Resource_Db_Abstract::_afterDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Resource_Db_Abstract的用法示例。


在下文中一共展示了Mage_Core_Model_Resource_Db_Abstract::_afterDelete方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _afterDelete

 /**
  * Perform actions after object delete
  *
  * @param Varien_Object $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     $file = $this->getContentFile($object->getId());
     if (file_exists($file)) {
         @unlink($file);
     }
     return parent::_afterDelete($object);
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:14,代码来源:Email.php

示例2: _afterDelete

 /**
  * Method set default group id to the customers collection
  *
  * @param Mage_Core_Model_Abstract $group
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $group)
 {
     $customerCollection = Mage::getResourceModel('Mage_Customer_Model_Resource_Customer_Collection')->addAttributeToFilter('group_id', $group->getId())->load();
     foreach ($customerCollection as $customer) {
         $defaultGroupId = Mage::helper('Mage_Customer_Helper_Data')->getDefaultCustomerGroupId($customer->getStoreId());
         $customer->setGroupId($defaultGroupId);
         $customer->save();
     }
     return parent::_afterDelete($group);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:16,代码来源:Group.php

示例3: _afterDelete

 /**
  * Method set default group id to the customers collection
  *
  * @param Mage_Core_Model_Abstract $group
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $group)
 {
     $customerCollection = Mage::getResourceModel('customer/customer_collection')->addAttributeToFilter('group_id', $group->getId())->load();
     foreach ($customerCollection as $customer) {
         $defaultGroupId = Mage::getStoreConfig(Mage_Customer_Model_Group::XML_PATH_DEFAULT_ID, $customer->getStoreId());
         $customer->setGroupId($defaultGroupId);
         $customer->save();
     }
     return parent::_afterDelete($group);
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:16,代码来源:Group.php

示例4: _afterDelete

 /**
  * Perform actions after object delete
  * Prepare rating data for reaggregate all data for reviews
  *
  * @param Mage_Rating_Model_Rating $object
  * @return Mage_Rating_Model_Resource_Rating
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     parent::_afterDelete($object);
     if (!Mage::helper('rating')->isModuleEnabled('Mage_Review')) {
         return $this;
     }
     $data = $this->_getEntitySummaryData($object);
     $summary = array();
     foreach ($data as $row) {
         $clone = clone $object;
         $clone->addData($row);
         $summary[$clone->getStoreId()][$clone->getEntityPkValue()] = $clone;
     }
     Mage::getResourceModel('review/review_summary')->reAggregate($summary);
     return $this;
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:23,代码来源:Rating.php

示例5: _afterDelete

 /**
  * Process data after delete
  * Validate if this revision can be removed
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Enterprise_Cms_Model_Resource_Page_Revision
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     $this->_aggregateVersionData((int) $object->getVersionId());
     return parent::_afterDelete($object);
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:12,代码来源:Revision.php

示例6: _afterDelete

 /**
  * After delete process
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Bundle_Model_Resource_Option
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     parent::_afterDelete($object);
     $this->_getWriteAdapter()->delete($this->getTable('bundle/option_value'), array('option_id = ?' => $object->getId()));
     return $this;
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:12,代码来源:Option.php

示例7: _afterDelete

 /**
  * Perform actions after object delete.
  * Delete layout updates by layout update ids collected in _beforeSave
  *
  * @param Mage_Widget_Model_Widget_Instance $object
  * @return Mage_Widget_Model_Resource_Widget_Instance
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     $this->_deleteLayoutUpdates($object->getLayoutUpdateIdsToDelete());
     return parent::_afterDelete($object);
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:12,代码来源:Instance.php

示例8: _afterDelete

 /**
  * @param Mage_Core_Model_Abstract $object
  * @return $this
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $object)
 {
     $this->_generateCache();
     return parent::_afterDelete($object);
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:9,代码来源:Block.php


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