Public Member Functions | |
__construct () | |
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('grid'); 00041 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 43 of file Grid.php.
00044 { 00045 00046 $collection = Mage::getResourceModel('reports/tag_product_collection'); 00047 00048 $collection->addTagedCount() 00049 ->addProductFilter($this->getRequest()->getParam('id')) 00050 ->addStatusFilter(Mage::getModel('tag/tag')->getApprovedStatus()) 00051 ->addStoresVisibility() 00052 ->setActiveFilter() 00053 ->addGroupByTag() 00054 ->setRelationId(); 00055 00056 $this->setCollection($collection); 00057 return parent::_prepareCollection(); 00058 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 60 of file Grid.php.
00061 { 00062 00063 $this->addColumn('tag_name', array( 00064 'header' =>Mage::helper('reports')->__('Tag Name'), 00065 'index' =>'tag_name' 00066 )); 00067 00068 $this->addColumn('taged', array( 00069 'header' =>Mage::helper('reports')->__('Tag use'), 00070 'index' =>'taged', 00071 'align' => 'right' 00072 )); 00073 00074 if (!Mage::app()->isSingleStoreMode()) { 00075 $this->addColumn('visible', array( 00076 'header' => Mage::helper('reports')->__('Visible In'), 00077 'sortable' => false, 00078 'index' => 'stores', 00079 'type' => 'store', 00080 'store_view'=> true 00081 )); 00082 } 00083 00084 $this->addExportType('*/*/exportProductDetailCsv', Mage::helper('reports')->__('CSV')); 00085 $this->addExportType('*/*/exportProductDetailExcel', Mage::helper('reports')->__('Excel')); 00086 00087 $this->setFilterVisibility(false); 00088 00089 return parent::_prepareColumns(); 00090 }