Public Member Functions | |
__construct () | |
getBackButtonHtml () | |
getResetButtonHtml () | |
getSaveButtonHtml () | |
getDeleteButtonHtml () | |
getUser () | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 27 of file Buttons.php.
__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 30 of file Buttons.php.
00031 { 00032 parent::__construct(); 00033 $this->setTemplate('permissions/userinfo.phtml'); 00034 }
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 36 of file Buttons.php.
00037 { 00038 $this->setChild('backButton', 00039 $this->getLayout()->createBlock('adminhtml/widget_button') 00040 ->setData(array( 00041 'label' => Mage::helper('adminhtml')->__('Back'), 00042 'onclick' => 'window.location.href=\''.$this->getUrl('*/*/').'\'', 00043 'class' => 'back' 00044 )) 00045 ); 00046 00047 $this->setChild('resetButton', 00048 $this->getLayout()->createBlock('adminhtml/widget_button') 00049 ->setData(array( 00050 'label' => Mage::helper('adminhtml')->__('Reset'), 00051 'onclick' => 'window.location.reload()' 00052 )) 00053 ); 00054 00055 $this->setChild('saveButton', 00056 $this->getLayout()->createBlock('adminhtml/widget_button') 00057 ->setData(array( 00058 'label' => Mage::helper('adminhtml')->__('Save Role'), 00059 'onclick' => 'roleForm.submit();return false;', 00060 'class' => 'save' 00061 )) 00062 ); 00063 00064 $this->setChild('deleteButton', 00065 $this->getLayout()->createBlock('adminhtml/widget_button') 00066 ->setData(array( 00067 'label' => Mage::helper('adminhtml')->__('Delete Role'), 00068 'onclick' => 'deleteConfirm(\'' . Mage::helper('adminhtml')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')', 00069 'class' => 'delete' 00070 )) 00071 ); 00072 return parent::_prepareLayout(); 00073 }
getBackButtonHtml | ( | ) |
Definition at line 75 of file Buttons.php.
00076 { 00077 return $this->getChildHtml('backButton'); 00078 }
getDeleteButtonHtml | ( | ) |
Definition at line 90 of file Buttons.php.
00091 { 00092 if( intval($this->getRequest()->getParam('rid')) == 0 ) { 00093 return; 00094 } 00095 return $this->getChildHtml('deleteButton'); 00096 }
getResetButtonHtml | ( | ) |
Definition at line 80 of file Buttons.php.
00081 { 00082 return $this->getChildHtml('resetButton'); 00083 }
getSaveButtonHtml | ( | ) |
Definition at line 85 of file Buttons.php.
00086 { 00087 return $this->getChildHtml('saveButton'); 00088 }
getUser | ( | ) |
Definition at line 98 of file Buttons.php.
00099 { 00100 return Mage::registry('user_data'); 00101 }