Mage_Adminhtml_Block_Report_Tag_Popular_Detail_Grid Class Reference

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

Protected Member Functions

 _prepareCollection ()
 _afterLoadCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.php.


Constructor & Destructor Documentation

__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('tag_grid');
00041     }


Member Function Documentation

_afterLoadCollection (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 56 of file Grid.php.

00057     {
00058         $this->getCollection()->addProductName();
00059     }

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 43 of file Grid.php.

00044     {
00045 
00046         $collection = Mage::getResourceModel('reports/tag_customer_collection')
00047                 ->addStatusFilter(Mage::getModel('tag/tag')->getApprovedStatus())
00048                 ->addTagFilter($this->getRequest()->getParam('id'))
00049                 ->addDescOrder();
00050 
00051         $this->setCollection($collection);
00052 
00053         return parent::_prepareCollection();
00054     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 61 of file Grid.php.

00062     {
00063 
00064         $this->addColumn('firstname', array(
00065             'header'    =>Mage::helper('reports')->__('First Name'),
00066             'sortable'  => false,
00067             'index'     =>'firstname'
00068         ));
00069 
00070         $this->addColumn('lastname', array(
00071             'header'    =>Mage::helper('reports')->__('Last Name'),
00072             'sortable'  => false,
00073             'index'     =>'lastname'
00074         ));
00075 
00076         $this->addColumn('product', array(
00077             'header'    =>Mage::helper('reports')->__('Product Name'),
00078             'sortable'  => false,
00079             'index'     =>'product'
00080         ));
00081 
00082         if (!Mage::app()->isSingleStoreMode()) {
00083             $this->addColumn('added_in', array(
00084                 'header'    => Mage::helper('reports')->__('Submitted In'),
00085                 'sortable'  => false,
00086                 'index'     => 'store_id',
00087                 'type'      => 'store',
00088                 'store_view'=> true
00089             ));
00090         }
00091 
00092         $this->setFilterVisibility(false);
00093 
00094         $this->addExportType('*/*/exportTagDetailCsv', Mage::helper('reports')->__('CSV'));
00095         $this->addExportType('*/*/exportTagDetailExcel', Mage::helper('reports')->__('Excel'));
00096 
00097         return parent::_prepareColumns();
00098     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:57 2009 for Magento by  doxygen 1.5.8