Mage_Adminhtml_Block_Urlrewrite_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Urlrewrite_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 34 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 37 of file Grid.php.

00038     {
00039         parent::__construct();
00040         $this->setId('urlrewriteGrid');
00041         $this->setDefaultSort('url_rewrite_id');
00042     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 44 of file Grid.php.

00045     {
00046         $collection = Mage::getResourceModel('core/url_rewrite_collection');
00047         $this->setCollection($collection);
00048         return parent::_prepareCollection();
00049     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 51 of file Grid.php.

00052     {
00053         $this->addColumn('url_rewrite_id', array(
00054             'header'    => $this->__('ID'),
00055             'width'     => '50px',
00056             'index'     => 'url_rewrite_id'
00057         ));
00058 
00059         if (!Mage::app()->isSingleStoreMode()) {
00060             $this->addColumn('store_id', array(
00061                 'header'    => $this->__('Store View'),
00062                 'width'     => '200px',
00063                 'index'     => 'store_id',
00064                 'type'      => 'store',
00065                 'store_view' => true,
00066             ));
00067         }
00068 
00069         $this->addColumn('is_system', array(
00070             'header'    =>$this->__('Type'),
00071             'width'     => '50px',
00072             'index'     => 'is_system',
00073             'type'      => 'options',
00074             'options'   => array(
00075                 1 => $this->__('System'),
00076                 0 => $this->__('Custom')
00077             ),
00078         ));
00079 
00080         $this->addColumn('id_path', array(
00081             'header'    => $this->__('ID Path'),
00082             'width'     => '50px',
00083             'index'     => 'id_path'
00084         ));
00085         $this->addColumn('request_path', array(
00086             'header'    => $this->__('Request Path'),
00087             'width'     => '50px',
00088             'index'     => 'request_path'
00089         ));
00090         $this->addColumn('target_path', array(
00091             'header'    => $this->__('Target Path'),
00092             'width'     => '50px',
00093             'index'     => 'target_path'
00094         ));
00095         $this->addColumn('options', array(
00096             'header'    => $this->__('Options'),
00097             'width'     => '50px',
00098             'index'     => 'options'
00099         ));
00100         $this->addColumn('actions', array(
00101             'header'    => $this->__('Action'),
00102             'width'     => '15px',
00103             'sortable'  => false,
00104             'filter'    => false,
00105             'type'      => 'action',
00106             'actions'   => array(
00107                 array(
00108                     'url'       => $this->getUrl('*/*/edit') . 'id/$url_rewrite_id',
00109                     'caption'   => $this->__('Edit'),
00110                 ),
00111             )
00112         ));
00113         //$this->addExportType('*/*/exportCsv', $this->__('CSV'));
00114         //$this->addExportType('*/*/exportXml', $this->__('XML'));
00115         return parent::_prepareColumns();
00116     }

getRowUrl ( row  ) 

Definition at line 118 of file Grid.php.

00119     {
00120         return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00121         //return $this->getUrl('*/*/view', array('id' => $row->getId()));
00122     }


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

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