Mage_Adminhtml_Block_Sales_Order_Create_Totals Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Totals:

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

 __construct ()
 getTotals ()
 getHeaderText ()
 getHeaderCssClass ()
 renderTotal ($total, $area=null, $colspan=1)
 renderTotals ($area=null, $colspan=1)
 canSendNewOrderConfirmationEmail ()

Protected Member Functions

 _getTotalRenderer ($code)

Protected Attributes

 $_totalRenderers
 $_defaultRenderer = 'adminhtml/sales_order_create_totals_default'


Detailed Description

Definition at line 35 of file Totals.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 40 of file Totals.php.

00041     {
00042         parent::__construct();
00043         $this->setId('sales_order_create_totals');
00044     }


Member Function Documentation

_getTotalRenderer ( code  )  [protected]

Definition at line 61 of file Totals.php.

00062     {
00063         if (!isset($this->_totalRenderers[$code])) {
00064             $this->_totalRenderers[$code] = $this->_defaultRenderer;
00065             $config = Mage::getConfig()->getNode("global/sales/quote/totals/{$code}/admin_renderer");
00066             if ($config)
00067                 $this->_totalRenderers[$code] = (string) $config;
00068 
00069             $this->_totalRenderers[$code] = $this->getLayout()->createBlock($this->_totalRenderers[$code], "{$code}_total_renderer");
00070         }
00071 
00072         return $this->_totalRenderers[$code];
00073     }

canSendNewOrderConfirmationEmail (  ) 

Definition at line 94 of file Totals.php.

00095     {
00096         return Mage::helper('sales')->canSendNewOrderConfirmationEmail($this->getQuote()->getStoreId());
00097     }

getHeaderCssClass (  ) 

Definition at line 56 of file Totals.php.

00057     {
00058         return 'head-money';
00059     }

getHeaderText (  ) 

Definition at line 51 of file Totals.php.

00052     {
00053         return Mage::helper('sales')->__('Order Totals');
00054     }

getTotals (  ) 

Definition at line 46 of file Totals.php.

00047     {
00048         return $this->getQuote()->getTotals();
00049     }

renderTotal ( total,
area = null,
colspan = 1 
)

Definition at line 75 of file Totals.php.

00076     {
00077         return $this->_getTotalRenderer($total->getCode())
00078             ->setTotal($total)
00079             ->setColspan($colspan)
00080             ->setRenderingArea(is_null($area) ? -1 : $area)
00081             ->toHtml();
00082     }

renderTotals ( area = null,
colspan = 1 
)

Definition at line 84 of file Totals.php.

00085     {
00086         $html = '';
00087         foreach($this->getTotals() as $total) {
00088             $html .= $this->renderTotal($total, $area, $colspan);
00089         }
00090 
00091         return $html;
00092     }


Member Data Documentation

$_defaultRenderer = 'adminhtml/sales_order_create_totals_default' [protected]

Definition at line 38 of file Totals.php.

$_totalRenderers [protected]

Definition at line 37 of file Totals.php.


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

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