Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () | |
Protected Attributes | |
$_collection |
Definition at line 35 of file Top.php.
__construct | ( | ) |
Setting default for every grid on dashboard
Reimplemented from Mage_Adminhtml_Block_Dashboard_Grid.
Definition at line 39 of file Top.php.
00040 { 00041 parent::__construct(); 00042 $this->setId('topSearchGrid'); 00043 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 45 of file Top.php.
00046 { 00047 $this->_collection = Mage::getModel('catalogsearch/query') 00048 ->getResourceCollection(); 00049 00050 if ($this->getRequest()->getParam('store')) { 00051 $storeIds = $this->getRequest()->getParam('store'); 00052 } else if ($this->getRequest()->getParam('website')){ 00053 $storeIds = Mage::app()->getWebsite($this->getRequest()->getParam('website'))->getStoreIds(); 00054 } else if ($this->getRequest()->getParam('group')){ 00055 $storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds(); 00056 } else { 00057 $storeIds = ''; 00058 } 00059 00060 $this->_collection 00061 ->setPopularQueryFilter($storeIds); 00062 00063 $this->setCollection($this->_collection); 00064 00065 return parent::_prepareCollection(); 00066 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 68 of file Top.php.
00069 { 00070 $this->addColumn('search_query', array( 00071 'header' => $this->__('Search Term'), 00072 'sortable' => false, 00073 'index' => 'query_text', 00074 'renderer' => 'adminhtml/dashboard_searches_renderer_searchquery', 00075 )); 00076 00077 $this->addColumn('num_results', array( 00078 'header' => $this->__('Results'), 00079 'sortable' => false, 00080 'index' => 'num_results', 00081 'type' => 'number' 00082 )); 00083 00084 $this->addColumn('popularity', array( 00085 'header' => $this->__('Number of Uses'), 00086 'sortable' => false, 00087 'index' => 'popularity', 00088 'type' => 'number' 00089 )); 00090 00091 $this->setFilterVisibility(false); 00092 $this->setPagerVisibility(false); 00093 00094 return parent::_prepareColumns(); 00095 }
getRowUrl | ( | $ | row | ) |
$_collection [protected] |