Public Member Functions | |
__construct () | |
getHeaderText () |
Definition at line 35 of file Edit.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 Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 37 of file Edit.php.
00038 { 00039 parent::__construct(); 00040 $this->_objectId = 'id'; 00041 $this->_controller = 'rating'; 00042 00043 $this->_updateButton('save', 'label', Mage::helper('rating')->__('Save Rating')); 00044 $this->_updateButton('delete', 'label', Mage::helper('rating')->__('Delete Rating')); 00045 00046 if( $this->getRequest()->getParam($this->_objectId) ) { 00047 00048 $ratingData = Mage::getModel('rating/rating') 00049 ->load($this->getRequest()->getParam($this->_objectId)); 00050 00051 Mage::register('rating_data', $ratingData); 00052 } 00053 00054 00055 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 57 of file Edit.php.
00058 { 00059 if( Mage::registry('rating_data') && Mage::registry('rating_data')->getId() ) { 00060 return Mage::helper('rating')->__("Edit Rating", $this->htmlEscape(Mage::registry('rating_data')->getRatingCode())); 00061 } else { 00062 return Mage::helper('rating')->__('New Rating'); 00063 } 00064 }