Mage_Adminhtml_Block_Promo_Catalog_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Promo_Catalog_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 35 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 38 of file Grid.php.

00039     {
00040         parent::__construct();
00041         $this->setId('promo_catalog_grid');
00042         $this->setDefaultSort('name');
00043         $this->setDefaultDir('ASC');
00044         $this->setSaveParametersInSession(true);
00045     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 47 of file Grid.php.

00048     {
00049         $collection = Mage::getModel('catalogrule/rule')
00050             ->getResourceCollection();
00051         $this->setCollection($collection);
00052         return parent::_prepareCollection();
00053     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 55 of file Grid.php.

00056     {
00057         $this->addColumn('rule_id', array(
00058             'header'    => Mage::helper('catalogrule')->__('ID'),
00059             'align'     =>'right',
00060             'width'     => '50px',
00061             'index'     => 'rule_id',
00062         ));
00063 
00064         $this->addColumn('name', array(
00065             'header'    => Mage::helper('catalogrule')->__('Rule Name'),
00066             'align'     =>'left',
00067             'index'     => 'name',
00068         ));
00069 
00070         $this->addColumn('from_date', array(
00071             'header'    => Mage::helper('catalogrule')->__('Date Start'),
00072             'align'     => 'left',
00073             'width'     => '120px',
00074             'type'      => 'date',
00075             'index'     => 'from_date',
00076         ));
00077 
00078         $this->addColumn('to_date', array(
00079             'header'    => Mage::helper('catalogrule')->__('Date Expire'),
00080             'align'     => 'left',
00081             'width'     => '120px',
00082             'type'      => 'date',
00083             'default'   => '--',
00084             'index'     => 'to_date',
00085         ));
00086 
00087         $this->addColumn('is_active', array(
00088             'header'    => Mage::helper('catalogrule')->__('Status'),
00089             'align'     => 'left',
00090             'width'     => '80px',
00091             'index'     => 'is_active',
00092             'type'      => 'options',
00093             'options'   => array(
00094                 1 => 'Active',
00095                 0 => 'Inactive',
00096             ),
00097         ));
00098 
00099         return parent::_prepareColumns();
00100     }

getRowUrl ( row  ) 

Definition at line 102 of file Grid.php.

00103     {
00104         return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
00105     }


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

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