Mage_Adminhtml_Block_Sales_Order_View_History Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_View_History:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getStatuses ()
 canSendCommentEmail ()
 getOrder ()
 canAddComment ()
 getSubmitUrl ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file History.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 36 of file History.php.

00037     {
00038         $onclick = "submitAndReloadArea($('order_history_block').parentNode, '".$this->getSubmitUrl()."')";
00039         $button = $this->getLayout()->createBlock('adminhtml/widget_button')
00040             ->setData(array(
00041                 'label'   => Mage::helper('sales')->__('Submit Comment'),
00042                 'class'   => 'save',
00043                 'onclick' => $onclick
00044             ));
00045         $this->setChild('submit_button', $button);
00046         return parent::_prepareLayout();
00047     }

canAddComment (  ) 

Definition at line 71 of file History.php.

00072     {
00073         return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/comment') &&
00074                $this->getOrder()->canComment();
00075     }

canSendCommentEmail (  ) 

Definition at line 56 of file History.php.

00057     {
00058         return Mage::helper('sales')->canSendOrderCommentEmail($this->getOrder()->getStore()->getId());
00059     }

getOrder (  ) 

Retrieve order model

Returns:
Mage_Sales_Model_Order

Definition at line 66 of file History.php.

00067     {
00068         return Mage::registry('sales_order');
00069     }

getStatuses (  ) 

Definition at line 49 of file History.php.

00050     {
00051         $state = $this->getOrder()->getState();
00052         $statuses = $this->getOrder()->getConfig()->getStateStatuses($state);
00053         return $statuses;
00054     }

getSubmitUrl (  ) 

Definition at line 77 of file History.php.

00078     {
00079         return $this->getUrl('*/*/addComment', array('order_id'=>$this->getOrder()->getId()));
00080     }


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

Generated on Sat Jul 4 17:23:01 2009 for Magento by  doxygen 1.5.8