Mage_Adminhtml_Block_Checkout_Agreement_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Checkout_Agreement_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 ()
 _afterLoadCollection ()
 _filterStoreCondition ($collection, $column)


Detailed Description

Definition at line 26 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 29 of file Grid.php.

00030     {
00031         parent::__construct();
00032         $this->setDefaultSort('agreement_id');
00033         $this->setId('agreementGrid');
00034         $this->setDefaultDir('asc');
00035         $this->setSaveParametersInSession(true);
00036     }


Member Function Documentation

_afterLoadCollection (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 90 of file Grid.php.

00091     {
00092         $this->getCollection()->walk('afterLoad');
00093         parent::_afterLoadCollection();
00094     }

_filterStoreCondition ( collection,
column 
) [protected]

Definition at line 96 of file Grid.php.

00097     {
00098         if (!$value = $column->getFilter()->getValue()) {
00099             return;
00100         }
00101 
00102         $this->getCollection()->addStoreFilter($value);
00103     }

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 38 of file Grid.php.

00039     {
00040         $collection = Mage::getModel('checkout/agreement')
00041             ->getCollection();
00042         $this->setCollection($collection);
00043         return parent::_prepareCollection();
00044     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 46 of file Grid.php.

00047     {
00048         $this->addColumn('agreement_id',
00049             array(
00050                 'header'=>Mage::helper('checkout')->__('ID'),
00051                 'align' =>'right',
00052                 'width' => '50px',
00053                 'index' => 'agreement_id'
00054             )
00055         );
00056 
00057         $this->addColumn('name',
00058             array(
00059                 'header'=>Mage::helper('checkout')->__('Condition Name'),
00060                 'index' => 'name'
00061             )
00062         );
00063 
00064         if (!Mage::app()->isSingleStoreMode()) {
00065             $this->addColumn('store_id', array(
00066                 'header'        => Mage::helper('adminhtml')->__('Store View'),
00067                 'index'         => 'store_id',
00068                 'type'          => 'store',
00069                 'store_all'     => true,
00070                 'store_view'    => true,
00071                 'sortable'      => false,
00072                 'filter_condition_callback'
00073                                 => array($this, '_filterStoreCondition'),
00074             ));
00075         }
00076 
00077         $this->addColumn('is_active', array(
00078             'header'    => Mage::helper('adminhtml')->__('Status'),
00079             'index'     => 'is_active',
00080             'type'      => 'options',
00081             'options'   => array(
00082                 0 => Mage::helper('adminhtml')->__('Disabled'),
00083                 1 => Mage::helper('adminhtml')->__('Enabled')
00084             ),
00085         ));
00086 
00087         return parent::_prepareColumns();
00088     }

getRowUrl ( row  ) 

Definition at line 105 of file Grid.php.

00106     {
00107         return $this->getUrl('*/*/edit', array('id' => $row->getId()));
00108     }


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