本文整理汇总了PHP中Mage_Core_Model_Mysql4_Abstract::_afterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Mysql4_Abstract::_afterDelete方法的具体用法?PHP Mage_Core_Model_Mysql4_Abstract::_afterDelete怎么用?PHP Mage_Core_Model_Mysql4_Abstract::_afterDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Mysql4_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Mysql4_Abstract::_afterDelete方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
//delete values
$this->_getReadAdapter()->delete($this->getTable('webforms/results_values'), 'field_id =' . $object->getId());
Mage::dispatchEvent('webforms_field_delete', array('field' => $object));
return parent::_afterDelete($object);
}
示例2: _afterDelete
/**
* After delete process
*
* @param Mage_Core_Model_Abstract $object
* @return Mage_Bundle_Model_Mysql4_Option
*/
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
parent::_afterDelete($object);
$condition = $this->_getWriteAdapter()->quoteInto('option_id = ?', $object->getId());
$this->_getWriteAdapter()->delete($this->getTable('option_value'), $condition);
return $this;
}
示例3: _afterDelete
public function _afterDelete(Mage_Core_Model_Abstract $object){
//delete values
$values = $this->_getReadAdapter()->delete($this->getTable('webforms/results_values'),
'result_id = '. $object->getId()
);
return parent::_afterDelete($object);
}
示例4: _afterDelete
public function _afterDelete(Mage_Core_Model_Abstract $object){
//set fields fieldset_id to null
$fields = Mage::getModel('webforms/fields')->getCollection()->addFilter('fieldset_id',$object->getId());
foreach($fields as $field){
$field->setFieldsetId(0)->save();
}
return parent::_afterDelete($object);
}
示例5: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
//delete values
$values = $this->_getReadAdapter()->delete($this->getTable('webforms/results_values'), 'result_id = ' . $object->getId());
$dir = Mage::getBaseDir('media') . DS . 'webforms' . DS . $object->getId();
$this->rrmdir($dir);
Mage::dispatchEvent('webforms_result_delete', array('result' => $object));
return parent::_afterDelete($object);
}
示例6: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
//set fields fieldset_id to null
$fields = Mage::getModel('webforms/fields')->getCollection()->addFilter('fieldset_id', $object->getId());
foreach ($fields as $field) {
$field->setFieldsetId(0)->save();
}
Mage::dispatchEvent('webforms_fieldset_delete', array('fieldset' => $object));
return parent::_afterDelete($object);
}
示例7: _afterDelete
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);
}
示例8: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
$condition = $this->_getWriteAdapter()->quoteInto('slider_id = ?', $object->getId());
// Stores
$this->_getWriteAdapter()->delete($this->getTable('auguria_sliders/stores'), $condition);
// Cms pages
$this->_getWriteAdapter()->delete($this->getTable('auguria_sliders/pages'), $condition);
// Category ids
$this->_getWriteAdapter()->delete($this->getTable('auguria_sliders/categories'), $condition);
return parent::_afterDelete($object);
}
示例9: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object){
//delete fields
$fields = Mage::getModel('webforms/fields')->getCollection()->addFilter('webform_id',$object->getId());
foreach($fields as $field){
$field->delete();
}
//delete fieldsets
$fieldsets = Mage::getModel('webforms/fieldsets')->getCollection()->addFilter('webform_id',$object->getId());
foreach($fieldsets as $fieldset){
$fieldset->delete();
}
return parent::_afterDelete($object);
}
示例10: _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_Mysql4_Widget_Instance
*/
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
$this->_deleteLayoutUpdates($object->getLayoutUpdateIdsToDelete());
return parent::_afterDelete($object);
}
示例11: _afterDelete
/**
* Perform actions after object delete
* Prepare rating data for reaggregate all data for reviews
*
* @param Mage_Core_Model_Abstract $object
* @return Mage_Rating_Model_Mysql4_Rating
*/
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
parent::_afterDelete($object);
$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;
}
示例12: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
$condition = $this->_getWriteAdapter()->quoteInto('query_id = ?', $object->getId());
$this->_getWriteAdapter()->delete($this->getTable('rocketweb_search/query_sku'), $condition);
return parent::_afterDelete($object);
}
示例13: _afterDelete
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
//delete values
$this->_getReadAdapter()->delete($this->getTable('webforms/results_values'), 'result_id = ' . $object->getId());
$dir = Mage::getBaseDir('media') . DS . 'webforms' . DS . $object->getId();
$this->rrmdir($dir);
//clear messages
$messages = Mage::getModel('webforms/message')->getCollection()->addFilter('result_id', $object->getId());
foreach ($messages as $message) {
$message->delete();
}
Mage::dispatchEvent('webforms_result_delete', array('result' => $object));
return parent::_afterDelete($object);
}
示例14: _afterDelete
/**
* Process data after delete
* Validate if this revision can be removed
*
* @param Mage_Core_Model_Abstract $object
* @return Enterprise_Cms_Model_Mysql4_Page_Revision
*/
protected function _afterDelete(Mage_Core_Model_Abstract $object)
{
$this->_aggregateVersionData((int) $object->getVersionId());
return parent::_afterDelete($object);
}