Mage_Sendfriend_Block_Send Class Reference

Inheritance diagram for Mage_Sendfriend_Block_Send:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getUserName ()
 getEmail ()
 getFormData ()
 getProductId ()
 getCategoryId ()
 getMaxRecipients ()


Detailed Description

Definition at line 28 of file Send.php.


Member Function Documentation

getCategoryId (  ) 

Definition at line 68 of file Send.php.

00069     {
00070         return $this->getRequest()->getParam('cat_id', null);
00071     }

getEmail (  ) 

Definition at line 45 of file Send.php.

00046     {
00047         if ($email = $this->getFormData()->getData('sender/email')) {
00048             return $email;
00049         }
00050         return (string) Mage::getSingleton('customer/session')->getCustomer()->getEmail();
00051     }

getFormData (  ) 

Definition at line 53 of file Send.php.

00054     {
00055         $data = $this->getData('form_data');
00056         if (is_null($data)) {
00057             $data = new Varien_Object(Mage::getSingleton('catalog/session')->getFormData(true));
00058             $this->setFormData($data);
00059         }
00060         return $data;
00061     }

getMaxRecipients (  ) 

Definition at line 73 of file Send.php.

00074     {
00075         $sendToFriendModel = Mage::registry('send_to_friend_model');
00076         return $sendToFriendModel->getMaxRecipients();
00077     }

getProductId (  ) 

Definition at line 63 of file Send.php.

00064     {
00065         return $this->getRequest()->getParam('id');
00066     }

getUserName (  ) 

Retrieve username for form field

Returns:
string

Definition at line 35 of file Send.php.

00036     {
00037         if ($name = $this->getFormData()->getData('sender/name')) {
00038             return $name;
00039         }
00040         $firstName =(string)Mage::getSingleton('customer/session')->getCustomer()->getFirstname();
00041         $lastName = (string)Mage::getSingleton('customer/session')->getCustomer()->getLastname();
00042         return $firstName.' '.$lastName;
00043     }


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

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