本文整理汇总了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);
}
示例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);
}
示例3: _beforeDelete
protected function _beforeDelete(Mage_Core_Model_Abstract $object)
{
foreach ($object->getChildren() as $children) {
$children->delete();
}
return parent::_beforeDelete($object);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}