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


PHP Mage_Core_Model_Mysql4_Abstract::_beforeDelete方法代码示例

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


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

示例1: _beforeDelete

 /**
  * Process popup data before deleting
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Etailers_Popup_Model_Resource_Popup
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     // Popup STORE
     $condition = array('popup_id = ?' => (int) $object->getId());
     $this->_getWriteAdapter()->delete($this->getTable('popup/popup_store'), $condition);
     return parent::_beforeDelete($object);
 }
开发者ID:purpleweb,项目名称:magento-popup,代码行数:13,代码来源:Popup.php

示例2: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $group)
 {
     if ($group->usesAsDefault()) {
         Mage::throwException(Mage::helper('customer')->__('The group "%s" cannot be deleted.', $group->getCode()));
     }
     return parent::_beforeDelete($group);
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:7,代码来源:Group.php

示例3: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     foreach ($object->getChildren() as $children) {
         $children->delete();
     }
     return parent::_beforeDelete($object);
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:7,代码来源:Glace_Menu_Model_Resource_Item.php

示例4: _beforeDelete

 /**
  * Call-back function
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     // Cleanup stats on brand delete
     $adapter = $this->_getReadAdapter();
     // 1. Delete brand/store
     //$adapter->delete($this->getTable('ves_brand/brand_store'), 'brand_id='.$object->getId());
     // 2. Delete brand/post_cat
     return parent::_beforeDelete($object);
 }
开发者ID:booklein,项目名称:bookle,代码行数:12,代码来源:Brand.php

示例5: _beforeDelete

 /**
  * Process contest data before deleting
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Etailers_Contest_Model_Resource_Contest
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     // Contest STORE
     $condition = array('contest_id = ?' => (int) $object->getId());
     $this->_getWriteAdapter()->delete($this->getTable('contest/contest_store'), $condition);
     // URL REWRITE
     $condition = array('id_path = ?' => "contest/view/" . (int) $object->getId());
     $this->_getWriteAdapter()->delete($this->getTable('core/url_rewrite'), $condition);
     return parent::_beforeDelete($object);
 }
开发者ID:par-orillonsoft,项目名称:magento-contests,代码行数:16,代码来源:Contest.php

示例6: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     $options = Mage::getResourceSingleton('mageworx_multifees/option')->getOptions($object->getId());
     if ($options) {
         $optionIds = array_keys($options);
         $helper = Mage::helper('mageworx_multifees');
         foreach ($optionIds as $optionId) {
             $helper->removeOptionFile($optionId);
         }
     }
     return parent::_beforeDelete($object);
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:12,代码来源:Fee.php

示例7: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     if (!Mage::helper('downloads')->isDefaultCategoryId($object->getId())) {
         $files = Mage::getModel('downloads/files');
         $data = $files->getResource()->getCategoryFiles($object->getId());
         if ($data) {
             foreach ($data as $file) {
                 $files->load($file[$files->getIdFieldName()])->setCategoryId(MageWorx_Downloads_Helper_Data::DEFAULT_CATEGORY_ID)->save();
             }
         }
     }
     return parent::_beforeDelete($object);
 }
开发者ID:commercekitchen,项目名称:dualeyewear-magento,代码行数:13,代码来源:Categories.php

示例8: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
     $connection->delete($this->getTable('email/event_trigger'), 'event_id = ' . $object->getId());
     return parent::_beforeDelete($object);
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:6,代码来源:Event.php

示例9: _beforeDelete

 /**
  * Call-back function
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     $adapter = $this->_getReadAdapter();
     // 1. Delete banner/store
     $adapter->delete($this->getTable('igallery/banner_store'), 'banner_id=' . $object->getId());
     $adapter->delete($this->getTable('igallery/banner_image'), 'banner_id=' . $object->getId());
     return parent::_beforeDelete($object);
 }
开发者ID:xiaoguizhidao,项目名称:extensiongsd,代码行数:11,代码来源:Banner.php

示例10: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     Mage::getSingleton('catalog/product_option')->removeProductOptions($object->getId());
     Mage::getResourceSingleton('customoptions/relation')->deleteGroup($object->getId());
     return parent::_beforeDelete($object);
 }
开发者ID:xiaoguizhidao,项目名称:cupboardglasspipes.ecomitize.com,代码行数:6,代码来源:Group.php

示例11: _beforeDelete

 /**
  * Process faq category before deleting
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Zeon_Faq_Model_Mysql4_Category
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     $this->_getWriteAdapter()->update($this->getTable('zeon_faq/faq'), array('category_id' => new Zend_Db_Expr('NULL')), array('category_id = ?' => (int) $object->getId()));
     return parent::_beforeDelete($object);
 }
开发者ID:Jonathonbyrd,项目名称:Optimized-Magento-1.9.x,代码行数:11,代码来源:Category.php

示例12: _beforeDelete

 /**
  * Remove index before delete rule
  *
  * @param Enterprise_TargetRule_Model_Rule $object
  * @return Enterprise_TargetRule_Model_Mysql4_Rule
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     Mage::getResourceModel('enterprise_targetrule/index')->cleanIndex($object->getData('apply_to'));
     return parent::_beforeDelete($object);
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:11,代码来源:Rule.php

示例13: _beforeDelete

 /**
  * Call-back function
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     // Cleanup stats on blog delete
     $adapter = $this->_getReadAdapter();
     // 1. Delete lookbookslider/slide
     $adapter->delete($this->getTable('lookbookslider/slide'), 'lookbookslider_id=' . $object->getId());
     // 2. Delete lookbookslider/page
     $adapter->delete($this->getTable('lookbookslider/page'), 'lookbookslider_id=' . $object->getId());
     // 3. Delete lookbookslider/category
     $adapter->delete($this->getTable('lookbookslider/category'), 'lookbookslider_id=' . $object->getId());
     return parent::_beforeDelete($object);
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:15,代码来源:Lookbookslider.php

示例14: _beforeDelete

 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     if ($object->getId() == Mage::helper('udropship')->getLocalVendorId()) {
         Mage::throwException(Mage::helper('udropship')->__('Cannot delete local vendor. Please change "Configuration / Drop Shipping / Vendor Options / Local Vendor" before'));
     }
     $this->resetVendorProducts($object);
     return parent::_beforeDelete($object);
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:8,代码来源:Vendor.php

示例15: _beforeDelete

 /**
  * Process job data before deleting
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Zeon_Jobs_Model_Mysql4_Jobs
  */
 protected function _beforeDelete(Mage_Core_Model_Abstract $object)
 {
     $condition = array('job_id = ?' => (int) $object->getId());
     $this->_getWriteAdapter()->delete($this->getTable('zeon_jobs/store'), $condition);
     return parent::_beforeDelete($object);
 }
开发者ID:xiaoguizhidao,项目名称:BumblebeeSite,代码行数:12,代码来源:Jobs.php


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