Neos\Neos\Controller\Module\Administration\SitesController::importSiteAction PHP Method

importSiteAction() public method

Import a site from site package.
public importSiteAction ( string $packageKey ) : void
$packageKey string Package from where the import will come
return void
    public function importSiteAction($packageKey)
    {
        try {
            $this->siteImportService->importFromPackage($packageKey);
            $this->addFlashMessage('The site has been imported.', '', null, array(), 1412372266);
        } catch (\Exception $exception) {
            $this->systemLogger->logException($exception);
            $this->addFlashMessage('Error: During the import of the "Sites.xml" from the package "%s" an exception occurred: %s', 'Import error', Message::SEVERITY_ERROR, array(htmlspecialchars($packageKey), htmlspecialchars($exception->getMessage())), 1412372375);
        }
        $this->unsetLastVisitedNodeAndRedirect('index');
    }