Пример #1
0
 /**
  * Import package
  *
  * @param string $packageKey Package to import
  * @return void
  */
 public function importAction($packageKey)
 {
     try {
         $this->packageManager->importPackage($packageKey);
         $message = new \TYPO3\FLOW3\Error\Message($packageKey . ' has been imported', 1343231682);
     } catch (\TYPO3\FLOW3\Package\Exception\PackageKeyAlreadyExistsException $exception) {
         $message = new \TYPO3\FLOW3\Error\Error($exception->getMessage(), 1343231683);
     } catch (\TYPO3\FLOW3\Package\Exception\PackageRepositoryException $exception) {
         $message = new \TYPO3\FLOW3\Error\Error($exception->getMessage(), 1343231684);
     }
     $this->flashMessageContainer->addMessage($message);
     $this->redirect('index');
 }
Пример #2
0
 /**
  * Import a package from a remote location
  *
  * Imports the specified package from a remote git repository.
  * The imported package will not be activated automatically.
  *
  * Currently only packages located at forge.typo3.org are supported.
  * Note that the git binary must be available
  *
  * @param string $packageKey The package key of the package to import
  * @return void
  * @see typo3.flow3:package:activate
  * @see typo3.flow3:package:create
  */
 public function importCommand($packageKey)
 {
     try {
         $this->packageManager->importPackage($packageKey);
         $this->outputLine('Imported package %s.', array($packageKey));
         Scripts::executeCommand('typo3.flow3:cache:flush', $this->settings, FALSE);
         $this->sendAndExit(0);
     } catch (\TYPO3\FLOW3\Package\Exception $exception) {
         $this->outputLine($exception->getMessage());
         $this->quit(1);
     }
 }