NodeExportService
class NodeExportService (View source)
Service for exporting content repository nodes as an XML structure
Internally, uses associative arrays instead of Domain Models for performance reasons, so "nodeData" in this class is always an associative array.
Constants
SUPPORTED_FORMAT_VERSION |
|
Properties
protected ObjectManagerInterface | $objectManager | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected PropertyMapper | $propertyMapper | ||
protected EntityManagerInterface | $entityManager | Doctrine's Entity Manager. |
|
protected NodeTypeManager | $nodeTypeManager | ||
protected NodeDataRepository | $nodeDataRepository | ||
protected Context | $securityContext | ||
protected ImportExportPropertyMappingConfiguration | $propertyMappingConfiguration | ||
protected XMLWriter | $xmlWriter | ||
protected Exception[] | $exceptionsDuringExport | ||
protected array | $exportedNodePaths |
Methods
No description
No description
Exports the node data of all nodes in the given sub-tree by writing them to the given XMLWriter.
Find all nodes of the specified workspace lying below the path specified by (and including) the given starting point.
Exports the given Nodes into the XML structure, contained in
Exports a single Node into the XML structure
Writes out a single property into the XML structure.
If $this->exceptionsDuringImport is non-empty, build up a new composite exception which contains the individual messages and re-throw that one.
Details
injectLogger(LoggerInterface $logger)
No description
injectThrowableStorage(ThrowableStorageInterface $throwableStorage)
No description
XMLWriter
export(string $startingPointNodePath = '/', string $workspaceName = 'live', XMLWriter $xmlWriter = null, bool $tidy = true, bool $endDocument = true, string $resourceSavePath = null, string $nodeTypeFilter = null)
Exports the node data of all nodes in the given sub-tree by writing them to the given XMLWriter.
protected array
findNodeDataListToExport(string $pathStartingPoint, string $workspace = 'live', string $nodeTypeFilter = null)
Find all nodes of the specified workspace lying below the path specified by (and including) the given starting point.
protected void
exportNodeDataList(array $nodeDataList)
Exports the given Nodes into the XML structure, contained in
protected void
exportNodeData(array $nodeData, array $nodesStack)
Exports a single Node into the XML structure
protected void
writeConvertedElement(array $data, string $propertyName, string $elementName = null, string $declaredPropertyType = null)
Writes out a single property into the XML structure.
protected
handleExceptionsDuringExport()
If $this->exceptionsDuringImport is non-empty, build up a new composite exception which contains the individual messages and re-throw that one.