class SiteImportService (View source)

The Site Import Service

Properties

protected PackageManager $packageManager
protected SiteRepository $siteRepository
protected ContextFactoryInterface $contextFactory
protected NodeImportService $nodeImportService
protected WorkspaceRepository $workspaceRepository
protected ReflectionService $reflectionService
protected ObjectManagerInterface $objectManager
protected PersistenceManagerInterface $persistenceManager
protected EventEmittingService $eventEmittingService
protected string $resourcesPath
protected string[] $imageVariantClassNames

An array that contains all fully qualified class names that extend ImageVariant including ImageVariant itself

protected string[] $assetClassNames

An array that contains all fully qualified class names that implement AssetInterface

protected string[] $dateTimeClassNames

An array that contains all fully qualified class names that extend \DateTime including \DateTime itself

Methods

void
initializeObject()

No description

importFromPackage(string $packageKey)

Checks for the presence of Sites.xml in the given package and imports it if found.

importFromFile(string $pathAndFilename)

Imports one or multiple sites from the XML file at $pathAndFilename

getSiteByNodeName(string $siteNodeName)

Updates or creates a site with the given $siteNodeName

void
emitSiteImported(Site $site)

Signal that is triggered when a site has been imported successfully

Details

void initializeObject()

No description

Return Value

void

Site importFromPackage(string $packageKey)

Checks for the presence of Sites.xml in the given package and imports it if found.

Parameters

string $packageKey

Return Value

Site

the imported site

Exceptions

Exception

Site importFromFile(string $pathAndFilename)

Imports one or multiple sites from the XML file at $pathAndFilename

Parameters

string $pathAndFilename

Return Value

Site

The imported site

Exceptions

Exception

protected Site getSiteByNodeName(string $siteNodeName)

Updates or creates a site with the given $siteNodeName

Parameters

string $siteNodeName

Return Value

Site

protected void emitSiteImported(Site $site)

Signal that is triggered when a site has been imported successfully

Parameters

Site $site

The site that has been imported

Return Value

void