Mage_Adminhtml_Extensions_RemoteController Class Reference

Inheritance diagram for Mage_Adminhtml_Extensions_RemoteController:

Mage_Adminhtml_Controller_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 indexAction ()
 gridAction ()
 editAction ()
 installAction ()
 upgradeAction ()
 massInstallAction ()
 massInstallRunAction ()

Protected Member Functions

 _isAllowed ()


Detailed Description

Definition at line 37 of file RemoteController.php.


Member Function Documentation

_isAllowed (  )  [protected]

Reimplemented from Mage_Adminhtml_Controller_Action.

Definition at line 133 of file RemoteController.php.

00134     {
00135         return Mage::getSingleton('admin/session')->isAllowed('system/extensions/remote');
00136     }

editAction (  ) 

Definition at line 55 of file RemoteController.php.

00056     {
00057         $this->loadLayout();
00058 
00059         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00060         $ext = Mage::getModel('adminhtml/extension')->loadRemote($pkg);
00061 #echo "<pre>".print_r($ext->getData(),1)."</pre>";
00062         Mage::register('remote_extension', $ext);
00063         $this->_setActiveMenu('system/extensions/remote');
00064 
00065         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_remote_edit'));
00066         $this->_addLeft($this->getLayout()->createBlock('adminhtml/extensions_remote_edit_tabs'));
00067 
00068         $this->renderLayout();
00069     }

gridAction (  ) 

Definition at line 50 of file RemoteController.php.

00051     {
00052         $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/extensions_remote_grid')->toHtml());
00053     }

indexAction (  ) 

Definition at line 39 of file RemoteController.php.

00040     {
00041         $this->loadLayout();
00042 
00043         $this->_setActiveMenu('system/extensions/remote');
00044 
00045         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_remote'));
00046 
00047         $this->renderLayout();
00048     }

installAction (  ) 

Definition at line 71 of file RemoteController.php.

00072     {
00073         $pkg = str_replace('|', '/', $this->getRequest()->getParam('id'));
00074         $params = array('comment'=>Mage::helper('adminhtml')->__("Downloading and installing $pkg, please wait...")."\r\n\r\n");
00075         if ($this->getRequest()->getParam('do')) {
00076             $params['command'] = 'install';
00077             $params['options'] = array('onlyreqdeps'=>1);
00078             $params['params'] = array($pkg);
00079         }
00080         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00081         if (!$result instanceof PEAR_Error) {
00082             Mage::app()->cleanCache();
00083         }
00084         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00085     }

massInstallAction (  ) 

Definition at line 103 of file RemoteController.php.

00104     {
00105         $this->loadLayout();
00106 
00107         $this->_setActiveMenu('system/extensions');
00108 
00109         $this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_mass_install')->initForm());
00110 
00111         $this->renderLayout();
00112     }

massInstallRunAction (  ) 

Definition at line 114 of file RemoteController.php.

00115     {
00116         $params = array('comment'=>Mage::helper('adminhtml')->__("Installing selected packages, please wait...")."\r\n\r\n");
00117         if ($this->getRequest()->getParam('do')) {
00118             $params['command'] = 'install';
00119             $params['options'] = array();
00120             $packages = array();
00121             foreach ($this->getRequest()->getPost('package') as $package) {
00122                 $packages[] = str_replace('|', '/', $package);
00123             }
00124             $params['params'] = $packages;
00125         }
00126         $result = Varien_Pear::getInstance()->runHtmlConsole($params);
00127         if (!$result instanceof PEAR_Error) {
00128             Mage::app()->cleanCache();
00129         }
00130         Mage::app()->getFrontController()->getResponse()->clearAllHeaders();
00131     }

upgradeAction (  ) 

Definition at line 87 of file RemoteController.php.

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


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