Mage_Adminhtml_Block_Sitemap_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sitemap_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('sitemapGrid');
00041         $this->setDefaultSort('sitemap_id');
00042 
00043     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

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  ) 

Row click url

Returns:
string

Definition at line 109 of file Grid.php.

00110     {
00111         return $this->getUrl('*/*/edit', array('sitemap_id' => $row->getId()));
00112     }


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

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