Mage_Adminhtml_Block_Promo_Quote_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Promo_Quote_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_quote_grid');
00042         $this->setDefaultSort('sort_order');
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('salesrule/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('salesrule')->__('ID'),
00059             'align'     =>'right',
00060             'width'     => '50px',
00061             'index'     => 'rule_id',
00062         ));
00063 
00064         $this->addColumn('name', array(
00065             'header'    => Mage::helper('salesrule')->__('Rule Name'),
00066             'align'     =>'left',
00067             'index'     => 'name',
00068         ));
00069 
00070         $this->addColumn('coupon_code', array(
00071             'header'    => Mage::helper('salesrule')->__('Coupon Code'),
00072             'align'     => 'left',
00073             'width'     => '150px',
00074             'index'     => 'coupon_code',
00075         ));
00076 
00077         $this->addColumn('from_date', array(
00078             'header'    => Mage::helper('salesrule')->__('Date Start'),
00079             'align'     => 'left',
00080             'width'     => '120px',
00081             'type'      => 'date',
00082             'index'     => 'from_date',
00083         ));
00084 
00085         $this->addColumn('to_date', array(
00086             'header'    => Mage::helper('salesrule')->__('Date Expire'),
00087             'align'     => 'left',
00088             'width'     => '120px',
00089             'type'      => 'date',
00090             'default'   => '--',
00091             'index'     => 'to_date',
00092         ));
00093 
00094         $this->addColumn('is_active', array(
00095             'header'    => Mage::helper('salesrule')->__('Status'),
00096             'align'     => 'left',
00097             'width'     => '80px',
00098             'index'     => 'is_active',
00099             'type'      => 'options',
00100             'options'   => array(
00101                 1 => 'Active',
00102                 0 => 'Inactive',
00103             ),
00104         ));
00105         
00106         $this->addColumn('sort_order', array(
00107             'header'    => Mage::helper('salesrule')->__('Priority'),
00108             'align'     => 'right',
00109             'index'     => 'sort_order',
00110         ));
00111 
00112         return parent::_prepareColumns();
00113     }

getRowUrl ( row  ) 

Definition at line 115 of file Grid.php.

00116     {
00117         return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
00118     }


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