/** * Install an action from TER * Downloads the extension, resolves dependencies and installs it * * @param \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension * @param string $downloadPath * @return array */ protected function installFromTer(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension, $downloadPath = 'Local') { $result = FALSE; $errorMessages = array(); try { $this->downloadUtility->setDownloadPath($downloadPath); if (($result = $this->managementService->installExtension($extension)) === FALSE) { $errorMessages = $this->managementService->getDependencyErrors(); } } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) { $errorMessages = array($extension->getExtensionKey() => array(array('code' => $e->getCode(), 'message' => $e->getMessage()))); } return array($result, $errorMessages); }
/** * Install an extension from TER * Downloads the extension, resolves dependencies and installs it * * @param \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension * @param string $downloadPath * @return array */ protected function installFromTer(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension, $downloadPath = 'Local') { $result = false; $errorMessages = array(); try { $this->downloadUtility->setDownloadPath($downloadPath); $this->managementService->setAutomaticInstallationEnabled($this->configurationUtility->getCurrentConfiguration('extensionmanager')['automaticInstallation']['value']); if (($result = $this->managementService->installExtension($extension)) === false) { $errorMessages = $this->managementService->getDependencyErrors(); } } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) { $errorMessages = array($extension->getExtensionKey() => array(array('code' => $e->getCode(), 'message' => $e->getMessage()))); } return array($result, $errorMessages); }