Mage_Adminhtml_Block_Report_Search_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Report_Search_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 (  ) 

Initialize Grid Properties

Reimplemented from Varien_Object.

Definition at line 40 of file Grid.php.

00041     {
00042         parent::__construct();
00043         $this->setId('searchReportGrid');
00044         $this->setDefaultSort('query_id');
00045         $this->setDefaultDir('desc');
00046     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare Search Report collection for grid

Returns:
Mage_Adminhtml_Block_Report_Search_Grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 53 of file Grid.php.

00054     {
00055         $collection = Mage::getResourceModel('catalogsearch/query_collection');
00056         $this->setCollection($collection);
00057 
00058         return parent::_prepareCollection();
00059     }

_prepareColumns (  )  [protected]

Prepare Grid columns

Returns:
Mage_Adminhtml_Block_Report_Search_Grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 66 of file Grid.php.

00067     {
00068         $this->addColumn('query_id', array(
00069             'header'    =>Mage::helper('reports')->__('ID'),
00070             'width'     =>'50px',
00071             'filter'    =>false,
00072             'index'     =>'query_id',
00073             'type'      =>'number'
00074         ));
00075 
00076         $this->addColumn('query_text', array(
00077             'header'    =>__('Search Query'),
00078             'filter'    =>false,
00079             'index'     =>'query_text'
00080         ));
00081 
00082         if (!Mage::app()->isSingleStoreMode()) {
00083             $this->addColumn('store_id', array(
00084                 'header'        => Mage::helper('catalog')->__('Store'),
00085                 'index'         => 'store_id',
00086                 'type'          => 'store',
00087                 'store_view'    => true,
00088                 'sortable'      => false
00089             ));
00090         }
00091 
00092         $this->addColumn('num_results', array(
00093             'header'    =>Mage::helper('reports')->__('Results'),
00094             'width'     =>'50px',
00095             'align'     =>'right',
00096             'type'      =>'number',
00097             'index'     =>'num_results'
00098         ));
00099 
00100         $this->addColumn('popularity', array(
00101             'header'    =>Mage::helper('reports')->__('Hits'),
00102             'width'     =>'50px',
00103             'align'     =>'right',
00104             'type'      =>'number',
00105             'index'     =>'popularity'
00106         ));
00107 
00108         $this->addExportType('*/*/exportSearchCsv', Mage::helper('reports')->__('CSV'));
00109         $this->addExportType('*/*/exportSearchExcel', Mage::helper('reports')->__('Excel'));
00110 
00111         return parent::_prepareColumns();
00112     }

getRowUrl ( row  ) 

Retrieve Row Click callback URL

Returns:
string

Definition at line 119 of file Grid.php.

00120     {
00121         return $this->getUrl('*/catalog_search/edit', array('id' => $row->getId()));
00122     }


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