Mage_Adminhtml_Block_Review_Main Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Review_Main:

Mage_Adminhtml_Block_Widget_Grid_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 ()


Detailed Description

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


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

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