Mage_Adminhtml_Block_Sales_Order_Comments_View Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Comments_View:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getSubmitUrl ()
 canSendCommentEmail ()

Protected Member Functions

 _beforeToHtml ()
 _prepareLayout ()


Detailed Description

Definition at line 34 of file View.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Retrieve required options from parent

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 39 of file View.php.

00040     {
00041         if (!$this->getParentBlock()) {
00042             Mage::throwException(Mage::helper('adminhtml')->__('Invalid parrent block for this block'));
00043         }
00044         $this->setEntity($this->getParentBlock()->getSource());
00045         parent::_beforeToHtml();
00046     }

_prepareLayout (  )  [protected]

Prepare child blocks

Returns:
Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 53 of file View.php.

00054     {
00055         $button = $this->getLayout()->createBlock('adminhtml/widget_button')
00056             ->setData(array(
00057                 'id'      => 'submit_comment_button',
00058                 'label'   => Mage::helper('sales')->__('Submit Comment'),
00059                 'class'   => 'save'
00060             ));
00061         $this->setChild('submit_button', $button);
00062 
00063         return parent::_prepareLayout();
00064     }

canSendCommentEmail (  ) 

Definition at line 71 of file View.php.

00072     {
00073         switch ($this->getParentType()) {
00074             case 'invoice':
00075                 return Mage::helper('sales')->canSendInvoiceCommentEmail($this->getEntity()->getOrder()->getStore()->getId());
00076             case 'shipment':
00077                 return Mage::helper('sales')->canSendShipmentCommentEmail($this->getEntity()->getOrder()->getStore()->getId());
00078             case 'creditmemo':
00079                 return Mage::helper('sales')->canSendCreditmemoCommentEmail($this->getEntity()->getOrder()->getStore()->getId());
00080         }
00081 
00082         return true;
00083     }

getSubmitUrl (  ) 

Definition at line 66 of file View.php.

00067     {
00068         return $this->getUrl('*/*/addComment',array('id'=>$this->getEntity()->getId()));
00069     }


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

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