コード例 #1
0
ファイル: Observer.php プロジェクト: hyhoocchan/mage-local
 /**
  * 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'));
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: Observer.php プロジェクト: jpbender/mage_virtual
 /**
  * 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'));
 }
コード例 #4
0
ファイル: Type.php プロジェクト: jpbender/mage_virtual
 /**
  * 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);
 }
コード例 #5
0
ファイル: Controllers.php プロジェクト: jpbender/mage_virtual
 /**
  * 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);
 }