Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Tag_Customer Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Tag_Customer:

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 ()
 getGridUrl ()

Protected Member Functions

 _prepareCollection ()
 _afterLoadCollection ()
 _prepareColumns ()
 getRowUrl ($row)


Detailed Description

Definition at line 35 of file Customer.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 Customer.php.

00038     {
00039         parent::__construct();
00040         $this->setId('tag_customers_grid');
00041         $this->setDefaultSort('firstname');
00042         $this->setDefaultDir('ASC');
00043         $this->setUseAjax(true);
00044     }


Member Function Documentation

_afterLoadCollection (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 58 of file Customer.php.

00059     {
00060         return parent::_afterLoadCollection();
00061     }

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 46 of file Customer.php.

00047     {
00048         $tagId = Mage::registry('tagId');
00049         $collection = Mage::getModel('tag/tag')
00050             ->getCustomerCollection()
00051             ->addProductFilter($this->getProductId())
00052             ->addGroupByTag();
00053 
00054         $this->setCollection($collection);
00055         return parent::_prepareCollection();
00056     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 63 of file Customer.php.

00064     {
00065         $this->addColumn('firstname', array(
00066             'header'    => Mage::helper('catalog')->__('First Name'),
00067             'index'     => 'firstname',
00068         ));
00069 
00070         $this->addColumn('lastname', array(
00071             'header'        => Mage::helper('catalog')->__('Last Name'),
00072             'index'         => 'lastname',
00073         ));
00074 
00075         $this->addColumn('email', array(
00076             'header'        => Mage::helper('catalog')->__('Email'),
00077             'index'         => 'email',
00078         ));
00079 
00080         $this->addColumn('name', array(
00081             'header'        => Mage::helper('catalog')->__('Tag Name'),
00082             'index'         => 'name',
00083         ));
00084 
00085         return parent::_prepareColumns();
00086     }

getGridUrl (  ) 

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 96 of file Customer.php.

00097     {
00098         return $this->getUrl('*/catalog_product/tagCustomerGrid', array(
00099             '_current' => true,
00100             'id'       => $this->getProductId(),
00101             'product_id' => $this->getProductId(),
00102         ));
00103     }

getRowUrl ( row  )  [protected]

Definition at line 88 of file Customer.php.

00089     {
00090         return $this->getUrl('*/tag/edit', array(
00091             'tag_id' => $row->getTagId(),
00092             'product_id' => $this->getProductId(),
00093         ));
00094     }


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

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