Public Member Functions | |
getRowUrl ($row) | |
getGridUrl () | |
Protected Member Functions | |
_construct () | |
_prepareCollection () | |
_prepareColumns () | |
_prepareMassaction () |
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 36 of file Grid.php.
00037 { 00038 $this->setId('packagesGrid'); 00039 $this->setEmptyText(Mage::helper('adminhtml')->__('No Extensions Found')); 00040 $this->setUseAjax(true); 00041 $this->setSaveParametersInSession(true); 00042 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 44 of file Grid.php.
00045 { 00046 $collection = Mage::getModel('adminhtml/extension_local_collection'); 00047 00048 $this->setCollection($collection); 00049 00050 return parent::_prepareCollection(); 00051 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 53 of file Grid.php.
00054 { 00055 $ext = Mage::getModel('adminhtml/extension'); 00056 00057 $this->addColumn('channel', array( 00058 'header'=>Mage::helper('adminhtml')->__('Channel'), 00059 'index'=>'channel', 00060 #'type'=>'options', 00061 #'options'=>$ext->getKnownChannels(), 00062 )); 00063 00064 $this->addColumn('name', array( 00065 'header'=>Mage::helper('adminhtml')->__('Extension Name'), 00066 'index'=>'name', 00067 )); 00068 00069 $this->addColumn('version', array( 00070 'header'=>Mage::helper('adminhtml')->__('Version'), 00071 'index'=>'version', 00072 'type'=>'range', 00073 'width'=>'140px', 00074 )); 00075 00076 $this->addColumn('stability', array( 00077 'header'=>Mage::helper('adminhtml')->__('Stability'), 00078 'index'=>'stability', 00079 'type'=>'options', 00080 'options'=>$ext->getStabilityOptions(), 00081 )); 00082 00083 /* 00084 $this->addColumn('action', 00085 array( 00086 'header'=>Mage::helper('adminhtml')->__('Action'), 00087 'index'=>'template_id', 00088 'sortable'=>false, 00089 'filter' => false, 00090 'width' => '170px', 00091 'renderer' => 'adminhtml/extensions_local_grid_renderer_action' 00092 )); 00093 */ 00094 return $this; 00095 }
_prepareMassaction | ( | ) | [protected] |
Prepare grid massaction actions
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 97 of file Grid.php.
00098 { 00099 return $this; 00100 00101 $this->setMassactionIdField('id'); 00102 $this->getMassactionBlock()->setFormFieldName('package'); 00103 00104 $this->getMassactionBlock()->addItem('uninstall', array( 00105 'label'=> $this->__('Uninstall'), 00106 'url' => $this->getUrl('*/*/massUninstall'), 00107 'confirm' => $this->__('Are you sure you wish to UNINSTALL all selected packages?') 00108 )); 00109 00110 $this->getMassactionBlock()->addItem('upgrade', array( 00111 'label'=> $this->__('Upgrade'), 00112 'url' => $this->getUrl('*/*/massUpgrade'), 00113 'confirm' => $this->__('Are you sure you wish to UPGRADE all selected packages?') 00114 )); 00115 00116 return $this; 00117 }
getGridUrl | ( | ) |
getRowUrl | ( | $ | row | ) |
Definition at line 119 of file Grid.php.
00120 { 00121 $url = Mage::getModel('adminhtml/url'); 00122 $url->setQueryParam('id', $row->getId()); 00123 return $url->getUrl('*/*/edit'); 00124 }