PHP Класс Neos\Neos\Command\SiteCommandController

Наследование: extends Neos\Flow\Cli\CommandController
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$nodeContextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$nodeService Neos\ContentRepository\Domain\Service\NodeService
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$packageManager Neos\Flow\Package\PackageManagerInterface
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$siteExportService Neos\Neos\Domain\Service\SiteExportService
$siteImportService Neos\Neos\Domain\Service\SiteImportService
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$siteService Neos\Neos\Domain\Service\SiteService
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
activateCommand ( string $siteNode ) : void Activate a site
createCommand ( string $name, string $packageKey, string $nodeType = 'Neos.Neos.NodeTypes:Page', string $nodeName = null, boolean $inactive = false ) : void Create a new site
deactivateCommand ( string $siteNode ) : void Deactivate a site
exportCommand ( string $siteNode = null, boolean $tidy = true, string $filename = null, string $packageKey = null, string $nodeTypeFilter = null ) : void Export sites content (e.g. site:export --package-key "Neos.Demo")
importCommand ( string $packageKey = null, string $filename = null ) : void Import sites content
listCommand ( ) : void List available sites
pruneCommand ( string $siteNode = null, string $siteNodeName = null ) : void Remove all content and related data - for now. In the future we need some more sophisticated cleanup.

Описание методов

activateCommand() публичный Метод

This command activates the specified site.
public activateCommand ( string $siteNode ) : void
$siteNode string The node name of the site to activate
Результат void

createCommand() публичный Метод

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. If no nodeType option is specified the command will use Neos.Neos.NodeTypes:Page as fallback. The node type 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.
public createCommand ( string $name, string $packageKey, string $nodeType = 'Neos.Neos.NodeTypes:Page', string $nodeName = null, boolean $inactive = false ) : void
$name string The name of the site
$packageKey string The site package
$nodeType string The node type to use for the site node. (Default = Neos.Neos.NodeTypes:Page)
$nodeName string The name of the site node. If no nodeName is given it will be determined from the siteName.
$inactive boolean The new site is not activated immediately (default = false).
Результат void

deactivateCommand() публичный Метод

This command deactivates the specified site.
public deactivateCommand ( string $siteNode ) : void
$siteNode string The node name of the site to deactivate
Результат void

exportCommand() публичный Метод

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.
public exportCommand ( string $siteNode = null, boolean $tidy = true, string $filename = null, string $packageKey = null, string $nodeTypeFilter = null ) : void
$siteNode string the node name of the site to be exported; if none given will export all sites
$tidy boolean Whether to export formatted XML. This is defaults to true
$filename string relative path and filename to the XML file to create. Any resource will be stored in a sub folder "Resources".
$packageKey string Package to store the XML file in. Any resource will be stored in a sub folder "Resources".
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text")
Результат void

importCommand() публичный Метод

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).
public importCommand ( string $packageKey = null, string $filename = null ) : void
$packageKey string Package key specifying the package containing the sites content
$filename string relative path and filename to the XML file containing the sites content
Результат void

listCommand() публичный Метод

List available sites
public listCommand ( ) : void
Результат void

pruneCommand() публичный Метод

Remove all content and related data - for now. In the future we need some more sophisticated cleanup.
public pruneCommand ( string $siteNode = null, string $siteNodeName = null ) : void
$siteNode string Name of a site root node to clear only content of this site.
$siteNodeName string This option is deprecated, use --site-node instead
Результат void

Описание свойств

$nodeContextFactory защищенное свойство

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $nodeContextFactory
Результат Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$nodeService защищенное свойство

protected NodeService,Neos\ContentRepository\Domain\Service $nodeService
Результат Neos\ContentRepository\Domain\Service\NodeService

$nodeTypeManager защищенное свойство

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Результат Neos\ContentRepository\Domain\Service\NodeTypeManager

$packageManager защищенное свойство

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Результат Neos\Flow\Package\PackageManagerInterface

$persistenceManager защищенное свойство

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

$siteExportService защищенное свойство

protected SiteExportService,Neos\Neos\Domain\Service $siteExportService
Результат Neos\Neos\Domain\Service\SiteExportService

$siteImportService защищенное свойство

protected SiteImportService,Neos\Neos\Domain\Service $siteImportService
Результат Neos\Neos\Domain\Service\SiteImportService

$siteRepository защищенное свойство

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
Результат Neos\Neos\Domain\Repository\SiteRepository

$siteService защищенное свойство

protected SiteService,Neos\Neos\Domain\Service $siteService
Результат Neos\Neos\Domain\Service\SiteService

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface