Mage_Adminhtml_Extensions_LocalController Class Reference

Inheritance diagram for Mage_Adminhtml_Extensions_LocalController:

Mage_Adminhtml_Controller_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 indexAction ()
 gridAction ()
 editAction ()
 prepareAction ()
 upgradeAction ()
 uninstallAction ()
 upgradeAllAction ()
 upgradeAllRunAction ()
 massUninstallAction ()
 massUninstallRunAction ()
 massUpgradeAction ()
 massUpgradeRunAction ()

Protected Member Functions

 _isAllowed ()


Detailed Description

Definition at line 37 of file LocalController.php.


Member Function Documentation

_isAllowed (  )  [protected]

Reimplemented from Mage_Adminhtml_Controller_Action.

Definition at line 203 of file LocalController.php.

00204     {
00205         return Mage::getSingleton('admin/session')->isAllowed('system/extensions/local');
00206     }

editAction (  ) 

Definition at line 59 of file LocalController.php.

00060     {
00061         $this->loadLayout();
00062 
00063         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00064         $ext = Mage::getModel('adminhtml/extension')->loadLocal($pkg);
00065         Mage::register('local_extension', $ext);
00066 #echo "<pre>".print_r($ext->getData(),1)."</pre>";
00067         $this->_setActiveMenu('system/extensions/local');
00068 
00069         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_local_edit'));
00070         $this->_addLeft($this->getLayout()->createBlock('adminhtml/extensions_local_edit_tabs'));
00071 
00072         $this->renderLayout();
00073     }

gridAction (  ) 

Definition at line 54 of file LocalController.php.

00055     {
00056         $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/extensions_local_grid')->toHtml());
00057     }

indexAction (  ) 

Definition at line 39 of file LocalController.php.

00040     {
00041         $url = Mage::getBaseUrl('web').'downloader/?return='.urlencode(Mage::getUrl('adminhtml'));
00042         $this->getResponse()->setRedirect($url);
00043         return;
00044 
00045         $this->loadLayout();
00046 
00047         $this->_setActiveMenu('system/extensions/local');
00048 
00049         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_local'));
00050 
00051         $this->renderLayout();
00052     }

massUninstallAction (  ) 

Definition at line 143 of file LocalController.php.

00144     {
00145         $this->loadLayout();
00146 
00147         $this->_setActiveMenu('system/extensions');
00148 
00149         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_mass_uninstall')->initForm());
00150 
00151         $this->renderLayout();
00152     }

massUninstallRunAction (  ) 

Definition at line 154 of file LocalController.php.

00155     {
00156         $params = array('comment'=>Mage::helper('adminhtml')->__("Uninstalling selected packages, please wait...")."\r\n\r\n");
00157         if ($this->getRequest()->getParam('do')) {
00158             $params['command'] = 'uninstall';
00159             $params['options'] = array();
00160             $packages = array();
00161             foreach ($this->getRequest()->getPost('package') as $package) {
00162                 $packages[] = str_replace('|', '/', $package);
00163             }
00164             $params['params'] = $packages;
00165         }
00166         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00167         if (!$result instanceof PEAR_Error) {
00168             Mage::app()->cleanCache();
00169         }
00170         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00171     }

massUpgradeAction (  ) 

Definition at line 173 of file LocalController.php.

00174     {
00175         $this->loadLayout();
00176 
00177         $this->_setActiveMenu('system/extensions');
00178 
00179         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_mass_upgrade')->initForm());
00180 
00181         $this->renderLayout();
00182     }

massUpgradeRunAction (  ) 

Definition at line 184 of file LocalController.php.

00185     {
00186         $params = array('comment'=>Mage::helper('adminhtml')->__("Upgrading selected packages, please wait...")."\r\n\r\n");
00187         if ($this->getRequest()->getParam('do')) {
00188             $params['command'] = 'upgrade';
00189             $params['options'] = array();
00190             $packages = array();
00191             foreach ($this->getRequest()->getPost('package') as $package) {
00192                 $packages[] = str_replace('|', '/', $package);
00193             }
00194             $params['params'] = $packages;
00195         }
00196         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00197         if (!$result instanceof PEAR_Error) {
00198             Mage::app()->cleanCache();
00199         }
00200         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00201     }

prepareAction (  ) 

Definition at line 75 of file LocalController.php.

00076     {
00077         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00078         $params = array('comment'=>Mage::helper('adminhtml')->__("Preparing to change $pkg, please wait...")."\r\n\r\n");
00079         Varien_Pear::getInstance()->runHtmlConsole($params);
00080     }

uninstallAction (  ) 

Definition at line 98 of file LocalController.php.

00099     {
00100         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00101         $params = array('comment'=>Mage::helper('adminhtml')->__("Uninstalling $pkg, please wait...")."\r\n\r\n");
00102         if ($this->getRequest()->getParam('do')) {
00103             $params['command'] = 'uninstall';
00104             $params['options'] = array();
00105             $params['params'] = array($pkg);
00106         }
00107         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00108         if (!$result instanceof PEAR_Error) {
00109             Mage::app()->cleanCache();
00110         }
00111         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00112     }

upgradeAction (  ) 

Definition at line 82 of file LocalController.php.

00083     {
00084         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00085         $params = array('comment'=>Mage::helper('adminhtml')->__("Upgrading $pkg, please wait...")."\r\n\r\n");
00086         if ($this->getRequest()->getParam('do')) {
00087             $params['command'] = 'upgrade';
00088             $params['options'] = array();
00089             $params['params'] = array($pkg);
00090         }
00091         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00092         if (!$result instanceof PEAR_Error) {
00093             Mage::app()->cleanCache();
00094         }
00095         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00096     }

upgradeAllAction (  ) 

Definition at line 114 of file LocalController.php.

00115     {
00116         $this->loadLayout();
00117 
00118         $this->_setActiveMenu('system/extensions');
00119 
00120         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_local_upgrade')->initForm());
00121 
00122         $this->renderLayout();
00123     }

upgradeAllRunAction (  ) 

Definition at line 125 of file LocalController.php.

00126     {
00127         $params = array('comment'=>Mage::helper('adminhtml')->__("Upgrading all available packages, please wait...")."\r\n\r\n");
00128         if ($this->getRequest()->getParam('do')) {
00129             $params['command'] = 'upgrade-all';
00130             $params['options'] = array();
00131             $params['params'] = array();
00132         }
00133         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00134         if (!$result instanceof PEAR_Error) {
00135             Mage::app()->cleanCache();
00136             echo "ALL UPGRADES ARE DONE.\n";
00137         } else {
00138             echo "ERROR DURING UPGRADES.\n";
00139         }
00140         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00141     }


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

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