Public Member Functions | |
__construct () |
Definition at line 35 of file Main.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_Grid_Container.
Definition at line 37 of file Main.php.
00038 { 00039 $this->_addButtonLabel = Mage::helper('review')->__('Add New Review'); 00040 parent::__construct(); 00041 00042 $this->_controller = 'review'; 00043 00044 // lookup customer, if id is specified 00045 $customerId = $this->getRequest()->getParam('customerId', false); 00046 $customerName = ''; 00047 if ($customerId) { 00048 $customer = Mage::getModel('customer/customer')->load($customerId); 00049 $customerName = $customer->getFirstname() . ' ' . $customer->getLastname(); 00050 } 00051 00052 if( Mage::registry('usePendingFilter') === true ) { 00053 if ($customerName) { 00054 $this->_headerText = Mage::helper('review')->__('Pending reviews of customer `%s`', $customerName); 00055 } else { 00056 $this->_headerText = Mage::helper('review')->__('Pending reviews'); 00057 } 00058 $this->_removeButton('add'); 00059 } else { 00060 if ($customerName) { 00061 $this->_headerText = Mage::helper('review')->__('All reviews of customer `%s`', $customerName); 00062 } else { 00063 $this->_headerText = Mage::helper('review')->__('All Reviews'); 00064 } 00065 } 00066 }