Mage_Adminhtml_Block_Tax_Rate_Toolbar_Save Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Tax_Rate_Toolbar_Save:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getBackButtonHtml ()
 getResetButtonHtml ()
 getSaveButtonHtml ()
 getDeleteButtonHtml ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

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

00038     {
00039         parent::__construct();
00040         $this->assign('createUrl', $this->getUrl('*/tax_rate/save'));
00041         $this->setTemplate('tax/toolbar/rate/save.phtml');
00042     }


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 44 of file Save.php.

00045     {
00046         $this->setChild('backButton',
00047             $this->getLayout()->createBlock('adminhtml/widget_button')
00048                 ->setData(array(
00049                     'label'     => Mage::helper('tax')->__('Back'),
00050                     'onclick'   => 'window.location.href=\''.$this->getUrl('*/*/').'\'',
00051                     'class' => 'back'
00052                 ))
00053         );
00054 
00055         $this->setChild('resetButton',
00056             $this->getLayout()->createBlock('adminhtml/widget_button')
00057                 ->setData(array(
00058                     'label'     => Mage::helper('tax')->__('Reset'),
00059                     'onclick'   => 'window.location.reload()'
00060                 ))
00061         );
00062 
00063         $this->setChild('saveButton',
00064             $this->getLayout()->createBlock('adminhtml/widget_button')
00065                 ->setData(array(
00066                     'label'     => Mage::helper('tax')->__('Save Rate'),
00067                     'onclick'   => 'wigetForm.submit();return false;',
00068                     'class' => 'save'
00069                 ))
00070         );
00071 
00072         $this->setChild('deleteButton',
00073             $this->getLayout()->createBlock('adminhtml/widget_button')
00074                 ->setData(array(
00075                     'label'     => Mage::helper('tax')->__('Delete Rate'),
00076                     'onclick'   => 'deleteConfirm(\'' . Mage::helper('tax')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rate' => $this->getRequest()->getParam('rate'))) . '\')',
00077                     'class' => 'delete'
00078                 ))
00079         );
00080         return parent::_prepareLayout();
00081     }

getBackButtonHtml (  ) 

Definition at line 83 of file Save.php.

00084     {
00085         return $this->getChildHtml('backButton');
00086     }

getDeleteButtonHtml (  ) 

Definition at line 98 of file Save.php.

00099     {
00100         if( intval($this->getRequest()->getParam('rate')) == 0 ) {
00101             return;
00102         }
00103         return $this->getChildHtml('deleteButton');
00104     }

getResetButtonHtml (  ) 

Definition at line 88 of file Save.php.

00089     {
00090         return $this->getChildHtml('resetButton');
00091     }

getSaveButtonHtml (  ) 

Definition at line 93 of file Save.php.

00094     {
00095         return $this->getChildHtml('saveButton');
00096     }


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

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