Neos.Neos/Classes/Domain/Service/SiteImportService.php
public function importFromPackage($packageKey)
    {
        if (!$this->packageManager->isPackageAvailable($packageKey)) {
            throw new NeosException(sprintf('Error: Package "%s" is not active.', $packageKey), 1384192950);
        }
        $contentPathAndFilename = sprintf('resource://%s/Private/Content/Sites.xml', $packageKey);
        if (!file_exists($contentPathAndFilename)) {
            throw new NeosException(sprintf('Error: No content found in package "%s".', $packageKey), 1384192955);
        }
        try {
            return $this->importFromFile($contentPathAndFilename);
        } catch (\Exception $exception) {
            throw new NeosException(sprintf('Error: During import an exception occurred: "%s".', $exception->getMessage()), 1300360480, $exception);
        }
    }
public function importFromPackage($packageKey)
    {
        if (!$this->packageManager->isPackageAvailable($packageKey)) {
            throw new NeosException(sprintf('Error: Package "%s" is not active.', $packageKey), 1384192950);
        }
        $contentPathAndFilename = sprintf('resource://%s/Private/Content/Sites.xml', $packageKey);
        if (!file_exists($contentPathAndFilename)) {
            throw new NeosException(sprintf('Error: No content found in package "%s".', $packageKey), 1384192955);
        }
        try {
            return $this->importFromFile($contentPathAndFilename);
        } catch (\Exception $exception) {
            throw new NeosException(sprintf('Error: During import an exception occurred: "%s".', $exception->getMessage()), 1300360480, $exception);
        }
    }
public function importFromPackage ( $ packageKey ) { if ( ! $ this -> packageManager -> isPackageAvailable ( $ packageKey ) ) { throw new NeosException ( sprintf ( 'Error: Package "%s" is not active.' , $ packageKey ) , 1384192950 ) ; } $ contentPathAndFilename = sprintf ( 'resource://%s/Private/Content/Sites.xml' , $ packageKey ) ; if ( ! file_exists ( $ contentPathAndFilename ) ) { throw new NeosException ( sprintf ( 'Error: No content found in package "%s".' , $ packageKey ) , 1384192955 ) ; } try { return $ this -> importFromFile ( $ contentPathAndFilename ) ; } catch ( \ Exception $ exception ) { throw new NeosException ( sprintf ( 'Error: During import an exception occurred: "%s".' , $ exception -> getMessage ( ) ) , 1300360480 , $ exception ) ; } }
Checks for the presence of Sites.xml in the given package and imports it if found.

@param string $packageKey
@return Site the imported site
@throws NeosException
Checks for the presence of Sites . xml in the given package and imports it if found .