SiteCommandController
class SiteCommandController extends CommandController (View source)
The Site Command Controller
Properties
protected SiteImportService | $siteImportService | ||
protected SiteExportService | $siteExportService | ||
protected SiteRepository | $siteRepository | ||
protected SiteService | $siteService | ||
protected PackageManager | $packageManager | ||
protected ContextFactoryInterface | $nodeContextFactory | ||
protected NodeTypeManager | $nodeTypeManager | ||
protected NodeService | $nodeService | ||
protected PersistenceManagerInterface | $persistenceManager |
Methods
No description
No description
Create a new site
Import sites content
Export sites content (e.g. site:export --package-key "Neos.Demo")
Remove site with content and related data (with globbing)
List available sites
Activate a site (with globbing)
Deactivate a site (with globbing)
Find all sites the match the given site-node-name-pattern with support for globbing
Details
injectLogger(LoggerInterface $logger)
No description
injectThrowableStorage(ThrowableStorageInterface $throwableStorage)
No description
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.
void
importCommand(string $packageKey = null, string $filename = null)
Import sites content
This command allows for importing one or more sites or partial content from an XML source. The format must be identical to that produced by the export command.
If a filename is specified, this command expects the corresponding file to contain the XML structure. The filename php://stdin can be used to read from standard input.
If a package key is specified, this command expects a Sites.xml file to be located in the private resources directory of the given package (Resources/Private/Content/Sites.xml).
void
exportCommand(string $siteNode = null, bool $tidy = true, string $filename = null, string $packageKey = null, string $nodeTypeFilter = null)
Export sites content (e.g. site:export --package-key "Neos.Demo")
This command exports all or one specific site with all its content into an XML format.
If the package key option is given, the site(s) will be exported to the given package in the default location Resources/Private/Content/Sites.xml.
If the filename option is given, any resources will be exported to files in a folder named "Resources" alongside the XML file.
If neither the filename nor the package key option are given, the XML will be printed to standard output and assets will be embedded into the XML in base64 encoded form.
void
pruneCommand(string $siteNode)
Remove site with content and related data (with globbing)
In the future we need some more sophisticated cleanup.
void
listCommand()
List available sites
void
activateCommand(string $siteNode)
Activate a site (with globbing)
This command activates the specified site.
void
deactivateCommand(string $siteNode)
Deactivate a site (with globbing)
This command deactivates the specified site.
protected Site[]
findSitesByNodeNamePattern(string $siteNodePattern)
Find all sites the match the given site-node-name-pattern with support for globbing