Mage_GiftMessage_IndexController Class Reference

Inheritance diagram for Mage_GiftMessage_IndexController:

Mage_Core_Controller_Front_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 saveAction ()


Detailed Description

Definition at line 35 of file IndexController.php.


Member Function Documentation

saveAction (  ) 

Definition at line 37 of file IndexController.php.

00038     {
00039         $giftMessage = Mage::getModel('giftmessage/message');
00040         if($this->getRequest()->getParam('message')) {
00041             $giftMessage->load($this->getRequest()->getParam('message'));
00042         }
00043         try {
00044             $entity = $giftMessage->getEntityModelByType($this->_getMappedType($this->getRequest()->getParam('type')));
00045 
00046             $giftMessage->setSender($this->getRequest()->getParam('sender'))
00047                 ->setRecipient($this->getRequest()->getParam('recipient'))
00048                 ->setMessage($this->getRequest()->getParam('messagetext'))
00049                 ->save();
00050 
00051 
00052             $entity->load($this->getRequest()->getParam('item'))
00053                 ->setGiftMessageId($giftMessage->getId())
00054                 ->save();
00055 
00056             $this->getRequest()->setParam('message', $giftMessage->getId());
00057             $this->getRequest()->setParam('entity', $entity);
00058         } catch (Exception $e) {
00059 
00060         }
00061 
00062         $this->loadLayout();
00063         $this->renderLayout();
00064     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:13 2009 for Magento by  doxygen 1.5.8