/**
  * Create a new site from a site template
  *
  * This command uses a site template located in a sitePackage to create a new site with a new subdomain.
  *
  * @param string $sitePackage Package key of the Site containing the template under Templates/Content/Sites.xml
  * @param string $siteName The sitename
  * @param string $baseDomain The base domain name e.g. site.com => will be used like $siteName.site.com
  * @return void
  */
 public function newSiteCommand($sitePackage, $siteName, $baseDomain)
 {
     try {
         $site = $this->siteService->importSiteFromTemplate($sitePackage, $siteName, $baseDomain);
         $this->outputLine('Created a new site "%s"', array($site->getName()));
     } catch (\Exception $e) {
         $this->systemLogger->logException($e);
         $this->outputLine('An error occured during site creation, check error log for details');
     }
 }
Ejemplo n.º 2
0
 /**
  * @param string $packageKey
  * @param string $baseDomain
  * @param string $siteName
  * @Flow\Validate(argumentName="$siteName", type="\TYPO3\Flow\Validation\Validator\NotEmptyValidator")
  */
 public function createMultiSiteAction($packageKey, $baseDomain, $siteName = '')
 {
     $this->siteService->importSiteFromTemplate($packageKey, $siteName, $baseDomain);
     $this->redirect('index');
 }