PHP Class Neos\Neos\Domain\Service\SiteExportService

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$nodeExportService Neos\ContentRepository\Domain\Service\ImportExport\NodeExportService
$packageManager Neos\Flow\Package\PackageManagerInterface
$resourcesPath string Absolute path to exported resources, or NULL if resources should be inlined in the exported XML
$xmlWriter XMLWriter The XMLWriter that is used to construct the export.

Public Methods

Method Description
export ( array $sites, boolean $tidy = false, string $nodeTypeFilter = null ) : string Fetches the site with the given name and exports it into XML.
exportToFile ( array $sites, boolean $tidy = false, string $pathAndFilename, string $nodeTypeFilter = null ) : void Fetches the site with the given name and exports it as XML into the given file.
exportToPackage ( array $sites, boolean $tidy = false, string $packageKey, string $nodeTypeFilter = null ) : void Fetches the site with the given name and exports it into XML in the given package.

Protected Methods

Method Description
exportSite ( Site $site, string $nodeTypeFilter ) : void Export the given $site to the XMLWriter
exportSites ( array $sites, string $nodeTypeFilter ) : void Exports the given sites to the XMLWriter

Method Details

export() public method

Fetches the site with the given name and exports it into XML.
public export ( array $sites, boolean $tidy = false, string $nodeTypeFilter = null ) : string
$sites array
$tidy boolean Whether to export formatted XML
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text")
return string

exportSite() protected method

Export the given $site to the XMLWriter
protected exportSite ( Site $site, string $nodeTypeFilter ) : void
$site Neos\Neos\Domain\Model\Site
$nodeTypeFilter string
return void

exportSites() protected method

Exports the given sites to the XMLWriter
protected exportSites ( array $sites, string $nodeTypeFilter ) : void
$sites array
$nodeTypeFilter string
return void

exportToFile() public method

Fetches the site with the given name and exports it as XML into the given file.
public exportToFile ( array $sites, boolean $tidy = false, string $pathAndFilename, string $nodeTypeFilter = null ) : void
$sites array
$tidy boolean Whether to export formatted XML
$pathAndFilename string Path to where the export output should be saved to
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text")
return void

exportToPackage() public method

Fetches the site with the given name and exports it into XML in the given package.
public exportToPackage ( array $sites, boolean $tidy = false, string $packageKey, string $nodeTypeFilter = null ) : void
$sites array
$tidy boolean Whether to export formatted XML
$packageKey string Package key where the export output should be saved to
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text")
return void

Property Details

$contextFactory protected property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
return Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$nodeExportService protected property

protected NodeExportService,Neos\ContentRepository\Domain\Service\ImportExport $nodeExportService
return Neos\ContentRepository\Domain\Service\ImportExport\NodeExportService

$packageManager protected property

protected PackageManagerInterface,Neos\Flow\Package $packageManager
return Neos\Flow\Package\PackageManagerInterface

$resourcesPath protected property

Absolute path to exported resources, or NULL if resources should be inlined in the exported XML
protected string $resourcesPath
return string

$xmlWriter protected property

The XMLWriter that is used to construct the export.
protected XMLWriter $xmlWriter
return XMLWriter