Protected Member Functions | |
_construct () | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Grid.php.
_construct | ( | ) | [protected] |
Internal constructor, that is called from real constructor
Please override this one instead of overriding real __construct constructor
Please override this one instead of overriding real __construct constructor
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 37 of file Grid.php.
00038 { 00039 $this->setSaveParametersInSession(true); 00040 $this->setId('backupsGrid'); 00041 $this->setDefaultSort('time', 'desc'); 00042 }
_prepareCollection | ( | ) | [protected] |
Init backups collection
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 47 of file Grid.php.
00048 { 00049 $collection = Mage::getSingleton('backup/fs_collection'); 00050 $this->setCollection($collection); 00051 return parent::_prepareCollection(); 00052 }
_prepareColumns | ( | ) | [protected] |
Configuration of grid
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 57 of file Grid.php.
00058 { 00059 $url7zip = Mage::helper('adminhtml')->__('The archive can be uncompressed with <a href="%s">%s</a> on Windows systems', 'http://www.7-zip.org/', '7-Zip'); 00060 00061 $this->addColumn('time', array( 00062 'header' => Mage::helper('backup')->__('Time'), 00063 'index' => 'time_formated', 00064 'type' => 'datetime' 00065 )); 00066 00067 $this->addColumn('size', array( 00068 'header' => Mage::helper('backup')->__('Size, byte'), 00069 'index' => 'size', 00070 'type' => 'number', 00071 'sortable' => false, 00072 'filter' => false 00073 )); 00074 00075 $this->addColumn('type', array( 00076 'header' => Mage::helper('backup')->__('Type'), 00077 'filter' => 'adminhtml/backup_grid_filter_type', 00078 'renderer' => 'adminhtml/backup_grid_renderer_type', 00079 'index' =>'type' 00080 )); 00081 00082 $this->addColumn('download', array( 00083 'header' => Mage::helper('backup')->__('Download'), 00084 'format' => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type')) .'">gz</a> <small>('.$url7zip.')</small>', 00085 'index' => 'type', 00086 'sortable' => false, 00087 'filter' => false 00088 )); 00089 00090 $this->addColumn('action', array( 00091 'header' => Mage::helper('backup')->__('Action'), 00092 'type' => 'action', 00093 'width' => '80px', 00094 'filter' => false, 00095 'sortable' => false, 00096 'actions' => array(array( 00097 'url' => $this->getUrl('*/*/delete', array('time' => '$time', 'type' => '$type')), 00098 'caption' => Mage::helper('adminhtml')->__('Delete'), 00099 'confirm' => Mage::helper('adminhtml')->__('Are you sure you want to do this?') 00100 )), 00101 'index' => 'type', 00102 'sortable' => false 00103 )); 00104 00105 return $this; 00106 }