Mage_Adminhtml_Block_Report_Review_Customer_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Report_Review_Customer_Grid:

Mage_Adminhtml_Block_Widget_Grid Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getRowUrl ($row)

Protected Member Functions

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.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 Varien_Object.

Definition at line 37 of file Grid.php.

00038     {
00039         parent::__construct();
00040         $this->setId('customers_grid');
00041         $this->setDefaultSort('review_cnt');
00042         $this->setDefaultDir('desc');
00043     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 45 of file Grid.php.

00046     {
00047         $collection = Mage::getResourceModel('reports/review_customer_collection')
00048             ->joinCustomers();
00049 
00050         $this->setCollection($collection);
00051 
00052         return parent::_prepareCollection();
00053     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 55 of file Grid.php.

00056     {
00057         $this->addColumn('customer_name', array(
00058             'header'    => Mage::helper('reports')->__('Customer Name'),
00059             'index'     => 'customer_name',
00060             'default'   => Mage::helper('reports')->__('Guest'),
00061         ));
00062 
00063         $this->addColumn('review_cnt', array(
00064             'header'    => Mage::helper('reports')->__('Number Of Reviews'),
00065             'width'     => '40px',
00066             'align'     => 'right',
00067             'index'     => 'review_cnt'
00068         ));
00069 
00070         $this->addColumn('action', array(
00071             'header'    => Mage::helper('reports')->__('Action'),
00072             'width'     => '100px',
00073             'align'     => 'center',
00074             'filter'    => false,
00075             'sortable'  => false,
00076             'renderer'  => 'adminhtml/report_grid_column_renderer_customer'
00077         ));
00078 
00079         $this->setFilterVisibility(false);
00080 
00081         $this->addExportType('*/*/exportCustomerCsv', Mage::helper('reports')->__('CSV'));
00082         $this->addExportType('*/*/exportCustomerExcel', Mage::helper('reports')->__('Excel'));
00083 
00084         return parent::_prepareColumns();
00085     }

getRowUrl ( row  ) 

Definition at line 87 of file Grid.php.

00088     {
00089         return $this->getUrl('*/catalog_product_review', array('customerId' => $row->getCustomerId()));
00090     }


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

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