Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Grid.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 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 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
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 | ) |