Neos.Neos/Classes/Controller/Module/Administration/SitesController.php
public function createSitePackageAction($packageKey, $siteName)
    {
        if ($this->packageManager->isPackageAvailable('Neos.SiteKickstarter') === false) {
            $this->addFlashMessage('The package "%s" is required to create new site packages.', 'Missing Package', Message::SEVERITY_ERROR, ['Neos.SiteKickstarter'], 1475736232);
            $this->redirect('index');
        }

        if ($this->packageManager->isPackageAvailable($packageKey)) {
            $this->addFlashMessage('The package key "%s" already exists.', 'Invalid package key', Message::SEVERITY_ERROR, [htmlspecialchars($packageKey)], 1412372021);
            $this->redirect('index');
        }

        $generatorService = $this->objectManager->get(GeneratorService::class);
        $generatorService->generateSitePackage($packageKey, $siteName);

        $this->flashMessageContainer->addMessage(new Message(sprintf('Site Packages "%s" was created.', htmlspecialchars($packageKey))));
        $this->forward('importSite', null, null, ['packageKey' => $packageKey]);
    }
public function createSitePackageAction($packageKey, $siteName)
    {
        if ($this->packageManager->isPackageAvailable('Neos.SiteKickstarter') === false) {
            $this->addFlashMessage('The package "%s" is required to create new site packages.', 'Missing Package', Message::SEVERITY_ERROR, ['Neos.SiteKickstarter'], 1475736232);
            $this->redirect('index');
        }

        if ($this->packageManager->isPackageAvailable($packageKey)) {
            $this->addFlashMessage('The package key "%s" already exists.', 'Invalid package key', Message::SEVERITY_ERROR, [htmlspecialchars($packageKey)], 1412372021);
            $this->redirect('index');
        }

        $generatorService = $this->objectManager->get(GeneratorService::class);
        $generatorService->generateSitePackage($packageKey, $siteName);

        $this->flashMessageContainer->addMessage(new Message(sprintf('Site Packages "%s" was created.', htmlspecialchars($packageKey))));
        $this->forward('importSite', null, null, ['packageKey' => $packageKey]);
    }
public function createSitePackageAction ( $ packageKey , $ siteName ) { if ( $ this -> packageManager -> isPackageAvailable ( 'Neos.SiteKickstarter' ) === false ) { $ this -> addFlashMessage ( 'The package "%s" is required to create new site packages.' , 'Missing Package' , Message :: SEVERITY_ERROR , [ 'Neos.SiteKickstarter' ] , 1475736232 ) ; $ this -> redirect ( 'index' ) ; } if ( $ this -> packageManager -> isPackageAvailable ( $ packageKey ) ) { $ this -> addFlashMessage ( 'The package key "%s" already exists.' , 'Invalid package key' , Message :: SEVERITY_ERROR , [ htmlspecialchars ( $ packageKey ) ] , 1412372021 ) ; $ this -> redirect ( 'index' ) ; } $ generatorService = $ this -> objectManager -> get ( GeneratorService :: class ) ; $ generatorService -> generateSitePackage ( $ packageKey , $ siteName ) ; $ this -> flashMessageContainer -> addMessage ( new Message ( sprintf ( 'Site Packages "%s" was created.' , htmlspecialchars ( $ packageKey ) ) ) ) ; $ this -> forward ( 'importSite' , null , null , [ 'packageKey' => $ packageKey ] ) ; }
Create a new site-package and directly import it.

@param string $packageKey Package Name to create
@param string $siteName Site Name to create
@Flow\Validate(argumentName="$packageKey", type="\Neos\Neos\Validation\Validator\PackageKeyValidator")
@return void
Create a new site - package and directly import it .