class GeneratorService extends GeneratorService (View source)

Service to generate site packages

Properties

protected PackageManager $packageManager
protected ContentDimensionRepository $contentDimensionRepository

Methods

array
generateSitePackage(string $packageKey, string $siteName)

Generate a site package and fill it with boilerplate data.

void
generateSitesXml(string $packageKey, string $siteName)

Generate a "Sites.xml" for the given package and name.

void
generateSitesRootFusion(string $packageKey, string $siteName)

Generate basic root Fusion file.

void
generateSitesPageFusion(string $packageKey, string $siteName)

Generate basic Fusion documentNode file.

void
generateDefaultTemplate(string $packageKey, string $siteName)

Generate basic template file.

string
generateSiteNodeName(string $packageKey)

Generate site node name based on the given package key

generateNodeTypesConfiguration(string $packageKey)

Generate a example NodeTypes.yaml

generateAdditionalFolders(string $packageKey)

Generate additional folders for site packages.

string
renderSimpleTemplate(string $templatePathAndFilename, array $contextVariables)

Simplified template rendering

Details

array generateSitePackage(string $packageKey, string $siteName)

Generate a site package and fill it with boilerplate data.

Parameters

string $packageKey
string $siteName

Return Value

array

protected void generateSitesXml(string $packageKey, string $siteName)

Generate a "Sites.xml" for the given package and name.

Parameters

string $packageKey
string $siteName

Return Value

void

protected void generateSitesRootFusion(string $packageKey, string $siteName)

Generate basic root Fusion file.

Parameters

string $packageKey
string $siteName

Return Value

void

protected void generateSitesPageFusion(string $packageKey, string $siteName)

Generate basic Fusion documentNode file.

Parameters

string $packageKey
string $siteName

Return Value

void

protected void generateDefaultTemplate(string $packageKey, string $siteName)

Generate basic template file.

Parameters

string $packageKey
string $siteName

Return Value

void

protected string generateSiteNodeName(string $packageKey)

Generate site node name based on the given package key

Parameters

string $packageKey

Return Value

string

protected generateNodeTypesConfiguration(string $packageKey)

Generate a example NodeTypes.yaml

Parameters

string $packageKey

Exceptions

Exception

protected generateAdditionalFolders(string $packageKey)

Generate additional folders for site packages.

Parameters

string $packageKey

protected string renderSimpleTemplate(string $templatePathAndFilename, array $contextVariables)

Simplified template rendering

Parameters

string $templatePathAndFilename
array $contextVariables

Return Value

string