class SiteCommandController extends CommandController (View source)

The Site Command Controller

Properties

protected SiteRepository $siteRepository
protected SiteService $siteService
protected PackageManager $packageManager
protected PersistenceManagerInterface $persistenceManager

Methods

void
createCommand(string $name, string $packageKey, string $nodeType, string $nodeName = null, bool $inactive = false)

Create a new site

void
pruneCommand(string $siteNode)

Remove site with content and related data (with globbing)

void
listCommand()

List available sites

void
activateCommand(string $siteNode)

Activate a site (with globbing)

void
deactivateCommand(string $siteNode)

Deactivate a site (with globbing)

Site[]
findSitesByNodeNamePattern(string $siteNodePattern)

Find all sites the match the given site-node-name-pattern with support for globbing

Details

void createCommand(string $name, string $packageKey, string $nodeType, string $nodeName = null, bool $inactive = false)

Create a new site

This command allows to create a blank site with just a single empty document in the default dimension. The name of the site, the packageKey must be specified.

The node type given with the nodeType option must already exists and have the superType Neos.Neos:Document.

If no nodeName option is specified the command will create a unique node-name from the name of the site. If a node name is given it has to be unique for the setup.

If the flag activate is set to false new site will not be activated.

Parameters

string $name

The name of the site

string $packageKey

The site package

string $nodeType

The node type to use for the site node, e.g. Amce.Com:Page

string $nodeName

The name of the site node. If no nodeName is given it will be determined from the siteName.

bool $inactive

The new site is not activated immediately (default = false)

Return Value

void

void pruneCommand(string $siteNode)

Remove site with content and related data (with globbing)

In the future we need some more sophisticated cleanup.

Parameters

string $siteNode

Name for site root nodes to clear only content of this sites (globbing is supported)

Return Value

void

void listCommand()

List available sites

Return Value

void

void activateCommand(string $siteNode)

Activate a site (with globbing)

This command activates the specified site.

Parameters

string $siteNode

The node name of the sites to activate (globbing is supported)

Return Value

void

void deactivateCommand(string $siteNode)

Deactivate a site (with globbing)

This command deactivates the specified site.

Parameters

string $siteNode

The node name of the sites to deactivate (globbing is supported)

Return Value

void

protected Site[] findSitesByNodeNamePattern(string $siteNodePattern)

Find all sites the match the given site-node-name-pattern with support for globbing

Parameters

string $siteNodePattern

nodeName patterns for sites to find

Return Value

Site[]