Mage_Adminhtml_Block_System_Design_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Design_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)
 getGridUrl ()

Protected Member Functions

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.php.


Constructor & Destructor Documentation

__construct (  ) 

Class constructor

Reimplemented from Varien_Object.

Definition at line 40 of file Grid.php.

00041     {
00042         parent::__construct();
00043         $this->setId('designGrid');
00044         $this->setSaveParametersInSession(true);
00045         $this->setUseAjax(true);
00046     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid data collection

Returns:
Mage_Adminhtml_Block_System_Design_Grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 53 of file Grid.php.

00054     {
00055         $storeId = (int) $this->getRequest()->getParam('store', 0);
00056 
00057         $collection = Mage::getResourceModel('core/design_collection');
00058 
00059         $this->setCollection($collection);
00060         parent::_prepareCollection();
00061         return $this;
00062     }

_prepareColumns (  )  [protected]

Define grid columns

Returns:
Mage_Adminhtml_Block_System_Design_Grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 69 of file Grid.php.

00070     {
00071         if (!Mage::app()->isSingleStoreMode()) {
00072             $this->addColumn('store_id', array(
00073                 'header'        => Mage::helper('catalog')->__('Store'),
00074                 'width'         => '100px',
00075                 'type'          => 'store',
00076                 'store_view'    => true,
00077                 'sortable'      => false,
00078                 'index'         => 'store_id',
00079             ));
00080         }
00081 
00082         $this->addColumn('package', array(
00083                 'header'    => Mage::helper('catalog')->__('Design'),
00084                 'width'     => '150px',
00085                 'index'     => 'design',
00086         ));
00087         $this->addColumn('date_from', array(
00088             'header'    => Mage::helper('catalogrule')->__('Date From'),
00089             'align'     => 'left',
00090             'width'     => '100px',
00091             'type'      => 'date',
00092             'index'     => 'date_from',
00093         ));
00094 
00095         $this->addColumn('date_to', array(
00096             'header'    => Mage::helper('catalogrule')->__('Date To'),
00097             'align'     => 'left',
00098             'width'     => '100px',
00099             'type'      => 'date',
00100             'index'     => 'date_to',
00101         ));
00102 
00103         return parent::_prepareColumns();
00104     }

getGridUrl (  ) 

Prepare grid url

Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 122 of file Grid.php.

00123     {
00124         return $this->getUrl('*/*/grid', array('_current' => true));
00125     }

getRowUrl ( row  ) 

Prepare row click url

Parameters:
Varien_Object $row
Returns:
string

Definition at line 112 of file Grid.php.

00113     {
00114         return $this->getUrl('*/*/edit', array('id' => $row->getId()));
00115     }


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

Generated on Sat Jul 4 17:23:04 2009 for Magento by  doxygen 1.5.8