Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 35 of file Grid.php.
__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 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
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 | ) |