Mage_GiftMessage_Block_Message_Helper Class Reference

Inheritance diagram for Mage_GiftMessage_Block_Message_Helper:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 setEntity ($entity)
 getEntity ()
 setType ($type)
 getType ()
 hasGiftMessage ()
 setScriptIncluded ($value)
 getScriptIncluded ()
 getJsObjectName ()
 getEditUrl ()
 getMessage ()

Protected Member Functions

 _initMessage ()

Protected Attributes

 $_entity = null
 $_type = null
 $_giftMessage = null

Static Protected Attributes

static $_scriptIncluded = false


Detailed Description

Definition at line 35 of file Helper.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 44 of file Helper.php.

00045     {
00046         parent::__construct();
00047         $this->setTemplate('giftmessage/helper.phtml');
00048     }


Member Function Documentation

_initMessage (  )  [protected]

Definition at line 98 of file Helper.php.

00099     {
00100         $this->_giftMessage = $this->helper('giftmessage/message')->getGiftMessage(
00101                                             $this->getEntity()->getGiftMessageId()
00102                               );
00103         return $this;
00104     }

getEditUrl (  ) 

Definition at line 93 of file Helper.php.

00094     {
00095         return $this->helper('giftmessage/url')->getEditUrl($this->getEntity(), $this->getType());
00096     }

getEntity (  ) 

Definition at line 56 of file Helper.php.

00057     {
00058         return $this->_entity;
00059     }

getJsObjectName (  ) 

Definition at line 88 of file Helper.php.

00089     {
00090         return $this->getId() . 'JsObject';
00091     }

getMessage (  ) 

Definition at line 106 of file Helper.php.

00107     {
00108         if(is_null($this->_giftMessage)) {
00109             $this->_initMessage();
00110         }
00111 
00112         return $this->_giftMessage;
00113     }

getScriptIncluded (  ) 

Definition at line 83 of file Helper.php.

00084     {
00085         return self::$_scriptIncluded;
00086     }

getType (  ) 

Definition at line 67 of file Helper.php.

00068     {
00069         return $this->_type;
00070     }

hasGiftMessage (  ) 

Definition at line 72 of file Helper.php.

00073     {
00074         return $this->getEntity()->getGiftMessageId() > 0;
00075     }

setEntity ( entity  ) 

Definition at line 50 of file Helper.php.

00051     {
00052         $this->_entity = $entity;
00053         return $this;
00054     }

setScriptIncluded ( value  ) 

Definition at line 77 of file Helper.php.

00078     {
00079         self::$_scriptIncluded = $value;
00080         return $this;
00081     }

setType ( type  ) 

Definition at line 61 of file Helper.php.

00062     {
00063         $this->_type = $type;
00064         return $this;
00065     }


Member Data Documentation

$_entity = null [protected]

Definition at line 38 of file Helper.php.

$_giftMessage = null [protected]

Definition at line 40 of file Helper.php.

$_scriptIncluded = false [static, protected]

Definition at line 42 of file Helper.php.

$_type = null [protected]

Definition at line 39 of file Helper.php.


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

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