Mage_Adminhtml_Block_Rating_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Rating_Edit:

Mage_Adminhtml_Block_Widget_Form_Container Mage_Adminhtml_Block_Widget_Container Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getHeaderText ()


Detailed Description

Definition at line 35 of file Edit.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 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     }


Member Function Documentation

getHeaderText (  ) 

Get header text

Returns:
string

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     }


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

Generated on Sat Jul 4 17:22:54 2009 for Magento by  doxygen 1.5.8