Mage_Adminhtml_Block_Sales_Order_Create_Giftmessage Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Giftmessage:

Mage_Adminhtml_Block_Sales_Order_Create_Abstract Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getFormHtml (Varien_Object $entity, $entityType='quote')
 getItems ()

Protected Member Functions

 _getGiftmessageSaveModel ()


Detailed Description

Definition at line 35 of file Giftmessage.php.


Member Function Documentation

_getGiftmessageSaveModel (  )  [protected]

Retrieve gift message save model

Returns:
Mage_Adminhtml_Model_Giftmessage_Save

Definition at line 83 of file Giftmessage.php.

00084     {
00085         return Mage::getSingleton('adminhtml/giftmessage_save');
00086     }

getFormHtml ( Varien_Object entity,
entityType = 'quote' 
)

Generate form for editing of gift message for entity

Parameters:
Varien_Object $entity
string $entityType
Returns:
string

Definition at line 44 of file Giftmessage.php.

00044                                                                             {
00045         return $this->getLayout()->createBlock(
00046                     'adminhtml/sales_order_create_giftmessage_form'
00047                )->setEntity($entity)->setEntityType($entityType)->toHtml();
00048     }

getItems (  ) 

Retrive items allowed for gift messages.

If no items available return false.

Returns:
array|boolean

Definition at line 57 of file Giftmessage.php.

00058     {
00059         $items = array();
00060         $allItems = $this->getQuote()->getAllItems();
00061 
00062         foreach ($allItems as $item) {
00063             if($this->_getGiftmessageSaveModel()->getIsAllowedQuoteItem($item)
00064                && $this->helper('giftmessage/message')->getIsMessagesAvailable('item',
00065                         $item, $this->getStore())) {
00066                 // if item allowed
00067                 $items[] = $item;
00068             }
00069         }
00070 
00071         if(sizeof($items)) {
00072             return $items;
00073         }
00074 
00075         return false;
00076     }


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

Generated on Sat Jul 4 17:22:59 2009 for Magento by  doxygen 1.5.8