/** * Handler for invitation mass update * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @return Enterprise_Logging_Model_Event */ public function postDispatchInvitationMassUpdate($config, $eventModel) { $messages = Mage::getSingleton('admin/session')->getMessages(); $errors = $messages->getErrors(); $notices = $messages->getItemsByType(Mage_Core_Model_Message::NOTICE); $status = empty($errors) && empty($notices) ? Enterprise_Logging_Model_Event::RESULT_SUCCESS : Enterprise_Logging_Model_Event::RESULT_FAILURE; return $eventModel->setStatus($status)->setInfo(Mage::app()->getRequest()->getParam('invitations')); }
/** * Custom handler for Recurring Profiles status update * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @return Enterprise_Logging_Model_Event */ public function postDispatchRecurringProfilesUpdate($config, $eventModel) { $message = ''; $request = Mage::app()->getRequest(); if ($request->getParam('action')) { $message .= ucfirst($request->getParam('action')) . ' action: '; } $message .= Mage::getSingleton('adminhtml/session')->getMessages()->getLastAddedMessage()->getCode(); return $eventModel->setInfo($message); }
/** * Handler for cms revision publish * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @return Enterprise_Logging_Model_Event|false */ public function postDispatchCmsRevisionPublish($config, $eventModel) { return $eventModel->setInfo(Mage::app()->getRequest()->getParam('revision_id')); }
/** * Custom handler for giftregistry type save action * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @return Enterprise_Logging_Model_Event */ public function postDispatchTypeSave($config, $eventModel, $processor) { $typeData = Mage::app()->getRequest()->getParam('type'); $typeId = isset($typeData['type_id']) ? $typeData['type_id'] : Mage::helper('enterprise_logging')->__('New'); return $eventModel->setInfo($typeId); }
/** * Custom handler for sales archive operations * * @param Varien_Simplexml_Element $config * @param Enterprise_Logging_Model_Event $eventModel * @return Enterprise_Logging_Model_Event */ public function postDispatchSalesArchiveManagement($config, $eventModel) { $request = Mage::app()->getRequest(); $ids = $request->getParam('order_id', $request->getParam('order_ids')); if (is_array($ids)) { $ids = implode(', ', $ids); } return $eventModel->setInfo($ids); }