public function importFromPackage($packageKey)
{
if (!$this->packageManager->isPackageActive($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);
}
}