Mage_Adminhtml_Block_Report_Tag_Customer_Grid Class Reference

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

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     }


Member Function Documentation

_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 
00048         $collection->addStatusFilter(Mage::getModel('tag/tag')->getApprovedStatus())
00049             ->addGroupByCustomer()
00050             ->addTagedCount();
00051 
00052         $this->setCollection($collection);
00053         return parent::_prepareCollection();
00054     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 56 of file Grid.php.

00057     {
00058 
00059         $this->addColumn('entity_id', array(
00060             'header'    =>Mage::helper('reports')->__('ID'),
00061             'width'     => '50px',
00062             'align'     =>'right',
00063             'index'     =>'entity_id'
00064         ));
00065 
00066         $this->addColumn('firstname', array(
00067             'header'    =>Mage::helper('reports')->__('First Name'),
00068             'index'     =>'firstname'
00069         ));
00070 
00071         $this->addColumn('lastname', array(
00072             'header'    =>Mage::helper('reports')->__('Last Name'),
00073             'index'     =>'lastname'
00074         ));
00075 
00076         $this->addColumn('taged', array(
00077             'header'    =>Mage::helper('reports')->__('Total Tags'),
00078             'width'     =>'50px',
00079             'align'     =>'right',
00080             'index'     =>'taged'
00081         ));
00082 
00083         $this->addColumn('action',
00084             array(
00085                 'header'    => Mage::helper('catalog')->__('Action'),
00086                 'width'     => '100%',
00087                 'type'      => 'action',
00088                 'getter'    => 'getId',
00089                 'actions'   => array(
00090                     array(
00091                         'caption' => Mage::helper('catalog')->__('Show Tags'),
00092                         'url'     => array(
00093                             'base'=>'*/*/customerDetail'
00094                         ),
00095                         'field'   => 'id'
00096                     )
00097                 ),
00098                 'filter'    => false,
00099                 'sortable'  => false,
00100                 'index'     => 'stores',
00101         ));
00102 
00103         $this->setFilterVisibility(false);
00104 
00105         $this->addExportType('*/*/exportCustomerCsv', Mage::helper('reports')->__('CSV'));
00106         $this->addExportType('*/*/exportCustomerExcel', Mage::helper('reports')->__('Excel'));
00107 
00108         return parent::_prepareColumns();
00109     }

getRowUrl ( row  ) 

Definition at line 111 of file Grid.php.

00112     {
00113         return $this->getUrl('*/*/customerDetail', array('id'=>$row->getId()));
00114     }


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