Mage_Adminhtml_Block_Customer_Group_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Customer_Group_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('customerGroupGrid');
00041         $this->setDefaultSort('type');
00042         $this->setDefaultDir('asc');
00043     }


Member Function Documentation

_prepareCollection (  )  [protected]

Init customer groups collection

Returns:
void

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 49 of file Grid.php.

00050     {
00051         $collection = Mage::getResourceModel('customer/group_collection')
00052             ->addTaxClass();
00053 
00054         $this->setCollection($collection);
00055         return parent::_prepareCollection();
00056     }

_prepareColumns (  )  [protected]

Configuration of grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 61 of file Grid.php.

00062     {
00063         $this->addColumn('time', array(
00064             'header' => Mage::helper('customer')->__('ID'),
00065             'width' => '50px',
00066             'align' => 'right',
00067             'index' => 'customer_group_id',
00068         ));
00069 
00070         $this->addColumn('type', array(
00071             'header' => Mage::helper('customer')->__('Group Name'),
00072             'index' => 'customer_group_code',
00073         ));
00074 
00075         $this->addColumn('class_name', array(
00076             'header' => Mage::helper('customer')->__('Tax Class'),
00077             'index' => 'class_name',
00078             'width' => '200px'
00079         ));
00080 
00081         return parent::_prepareColumns();
00082     }

getRowUrl ( row  ) 

Definition at line 84 of file Grid.php.

00085     {
00086         return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00087     }


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

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