Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Offline_Store_Block_Adminhtml_Store_Grid extends Mage_Adminhtml_Block_Widget_Grid
- {
- public function __construct()
- {
- parent::__construct();
- $this->setId('cmsBlockGrid');
- $this->setDefaultSort('store_identifier');
- $this->setDefaultDir('ASC');
- }
- protected function _prepareCollection()
- {
- $collection = Mage::getModel('store/block')->getCollection();
- /* @var $collection Mage_Cms_Model_Mysql4_Block_Collection */
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
- protected function _prepareColumns()
- {
- // $baseUrl = $this->getUrl();
- $this->addColumn('store_id', array(
- 'header' => Mage::helper('store')->__('Id'),
- 'align' => 'left',
- 'index' => 'store_id',
- ));
- $this->addColumn('name', array(
- 'header' => Mage::helper('store')->__('Name'),
- 'align' => 'left',
- 'index' => 'name',
- ));
- $this->addColumn('country', array(
- 'header' => Mage::helper('store')->__('Country'),
- 'align' => 'left',
- 'index' => 'country'
- ));
- $this->addColumn('city', array(
- 'header' => Mage::helper('store')->__('City'),
- 'align' => 'left',
- 'index' => 'city'
- ));
- $this->addColumn('street', array(
- 'header' => Mage::helper('store')->__('Street'),
- 'align' => 'left',
- 'index' => 'street'
- ));
- $this->addColumn('status', array(
- 'header' => Mage::helper('store')->__('Status'),
- 'index' => 'status',
- 'type' => 'options',
- 'options' => array(
- 0 => Mage::helper('store')->__('Disabled'),
- 1 => Mage::helper('store')->__('Enabled')
- ),
- ));
- return parent::_prepareColumns();
- }
- /**
- * Row click url
- *
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('store_id' => $row->getId()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement