Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Grid.php.
__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('sitemapGrid'); 00041 $this->setDefaultSort('sitemap_id'); 00042 00043 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 45 of file Grid.php.
00046 { 00047 $collection = Mage::getModel('sitemap/sitemap')->getCollection(); 00048 /* @var $collection Mage_Sitemap_Model_Mysql4_Sitemap_Collection */ 00049 $this->setCollection($collection); 00050 return parent::_prepareCollection(); 00051 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 53 of file Grid.php.
00054 { 00055 $this->addColumn('sitemap_id', array( 00056 'header' => Mage::helper('sitemap')->__('ID'), 00057 'width' => '50px', 00058 'index' => 'sitemap_id' 00059 )); 00060 00061 $this->addColumn('sitemap_filename', array( 00062 'header' => Mage::helper('sitemap')->__('Filename'), 00063 'index' => 'sitemap_filename' 00064 )); 00065 00066 $this->addColumn('sitemap_path', array( 00067 'header' => Mage::helper('sitemap')->__('Path'), 00068 'index' => 'sitemap_path' 00069 )); 00070 00071 $this->addColumn('link', array( 00072 'header' => Mage::helper('sitemap')->__('Link for Google'), 00073 'index' => 'concat(sitemap_path, sitemap_filename)', 00074 'renderer' => 'adminhtml/sitemap_grid_renderer_link', 00075 )); 00076 00077 $this->addColumn('sitemap_time', array( 00078 'header' => Mage::helper('sitemap')->__('Last Time Generated'), 00079 'width' => '150px', 00080 'index' => 'sitemap_time', 00081 'type' => 'datetime', 00082 )); 00083 00084 00085 if (!Mage::app()->isSingleStoreMode()) { 00086 $this->addColumn('store_id', array( 00087 'header' => Mage::helper('sitemap')->__('Store View'), 00088 'index' => 'store_id', 00089 'type' => 'store', 00090 )); 00091 } 00092 00093 $this->addColumn('action', array( 00094 'header' => Mage::helper('sitemap')->__('Action'), 00095 'filter' => false, 00096 'sortable' => false, 00097 'width' => '100', 00098 'renderer' => 'adminhtml/sitemap_grid_renderer_action' 00099 )); 00100 00101 return parent::_prepareColumns(); 00102 }
getRowUrl | ( | $ | row | ) |