Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () | |
_prepareMassaction () |
Definition at line 35 of file Grid.php.
__construct | ( | ) |
Init Grid default properties
Reimplemented from Varien_Object.
Definition at line 41 of file Grid.php.
00042 { 00043 parent::__construct(); 00044 $this->setId('catalog_search_grid'); 00045 $this->setDefaultSort('name'); 00046 $this->setDefaultDir('ASC'); 00047 $this->setSaveParametersInSession(true); 00048 }
_prepareCollection | ( | ) | [protected] |
Prepare collection for Grid
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 55 of file Grid.php.
00056 { 00057 $collection = Mage::getModel('catalogsearch/query') 00058 ->getResourceCollection(); 00059 $this->setCollection($collection); 00060 return parent::_prepareCollection(); 00061 }
_prepareColumns | ( | ) | [protected] |
Prepare Grid columns
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 68 of file Grid.php.
00069 { 00070 /*$this->addColumn('query_id', array( 00071 'header' => Mage::helper('catalog')->__('ID'), 00072 'width' => '50px', 00073 'index' => 'query_id', 00074 ));*/ 00075 00076 $this->addColumn('search_query', array( 00077 'header' => Mage::helper('catalog')->__('Search Query'), 00078 'index' => 'query_text', 00079 )); 00080 00081 if (!Mage::app()->isSingleStoreMode()) { 00082 $this->addColumn('store_id', array( 00083 'header' => Mage::helper('catalog')->__('Store'), 00084 'index' => 'store_id', 00085 'type' => 'store', 00086 'store_view' => true, 00087 'sortable' => false 00088 )); 00089 } 00090 00091 $this->addColumn('num_results', array( 00092 'header' => Mage::helper('catalog')->__('Results'), 00093 'index' => 'num_results', 00094 'type' => 'number' 00095 )); 00096 00097 $this->addColumn('popularity', array( 00098 'header' => Mage::helper('catalog')->__('Number of Uses'), 00099 'index' => 'popularity', 00100 'type' => 'number' 00101 )); 00102 00103 $this->addColumn('synonim_for', array( 00104 'header' => Mage::helper('catalog')->__('Synonym for'), 00105 'align' => 'left', 00106 'index' => 'synonim_for', 00107 'width' => '160px' 00108 )); 00109 00110 $this->addColumn('redirect', array( 00111 'header' => Mage::helper('catalog')->__('Redirect'), 00112 'align' => 'left', 00113 'index' => 'redirect', 00114 'width' => '200px' 00115 )); 00116 00117 $this->addColumn('display_in_terms', array( 00118 'header'=>Mage::helper('catalog')->__('Display in Suggested Terms'), 00119 'sortable'=>true, 00120 'index'=>'display_in_terms', 00121 'type' => 'options', 00122 'width' => '100px', 00123 'options' => array( 00124 '1' => Mage::helper('catalog')->__('Yes'), 00125 '0' => Mage::helper('catalog')->__('No'), 00126 ), 00127 'align' => 'left', 00128 )); 00129 $this->addColumn('action', 00130 array( 00131 'header' => Mage::helper('catalog')->__('Action'), 00132 'width' => '100px', 00133 'type' => 'action', 00134 'getter' => 'getId', 00135 'actions' => array(array( 00136 'caption' => Mage::helper('catalog')->__('Edit'), 00137 'url' => array( 00138 'base'=>'*/*/edit' 00139 ), 00140 'field' => 'id' 00141 )), 00142 'filter' => false, 00143 'sortable' => false, 00144 'index' => 'catalog', 00145 )); 00146 return parent::_prepareColumns(); 00147 }
_prepareMassaction | ( | ) | [protected] |
Prepare grid massaction actions
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 154 of file Grid.php.
00155 { 00156 $this->setMassactionIdField('query_id'); 00157 $this->getMassactionBlock()->setFormFieldName('search'); 00158 00159 $this->getMassactionBlock()->addItem('delete', array( 00160 'label' => Mage::helper('catalog')->__('Delete'), 00161 'url' => $this->getUrl('*/*/massDelete'), 00162 'confirm' => Mage::helper('catalog')->__('Are you sure?') 00163 )); 00164 00165 return parent::_prepareMassaction(); 00166 }
getRowUrl | ( | $ | row | ) |