PHP Class Sulu\Component\Content\Export\Webspace

Inheritance: implements Sulu\Component\Content\Export\WebspaceInterface
显示文件 Open project: sulu/sulu

Protected Properties

Property Type Description
$contentExportManager Sulu\Component\Content\Export\ContentExportManagerInterface
$documentInspector Symfony\Component\Templating\EngineInterface
$documentManager Sulu\Component\DocumentManager\DocumentManager
$extensionManager Sulu\Component\Content\Extension\ExtensionManagerInterface
$formatFilePaths string[]
$structureManager Sulu\Component\Content\Compat\StructureManagerInterface
$templating Symfony\Component\Templating\EngineInterface

Public Methods

Method Description
__construct ( Symfony\Component\Templating\EngineInterface $templating, Sulu\Component\DocumentManager\DocumentManager $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Content\Extension\ExtensionManagerInterface $extensionManager, Sulu\Component\Content\Export\ContentExportManagerInterface $contentExportManager, array $formatFilePaths )
export ( $webspaceKey, $locale, $output, $format = '1.2.xliff', $uuid = null, $nodes = null, $ignoredNodes = null )
getExportData ( $webspaceKey, $locale, $output = null, $format = '1.2.xliff', $uuid = null, $nodes = null, $ignoredNodes = null )

Protected Methods

Method Description
buildNodeUuidToPathWhere ( $nodes, boolean | false $not = false ) : string Build query to return only specific nodes.
createProperty ( $name, $value = null, array $options = [], string $type = '', array $children = null ) : array Returns a array with the given value (name, value and options).
getBlockPropertyData ( BlockMetadata $property, PropertyValue $propertyValue, $format ) : array Creates and Returns a property-array for content-type Block.
getContentData ( BasePageDocument $document, $locale, $format ) : array Returns a array of the given content data of the document.
getDocuments ( string $webspaceKey, string $locale, string $uuid = null, array $nodes = null, array $ignoredNodes = null ) : array Returns all Documents from given webspace.
getDocumentsQueryString ( $webspaceKey, $locale, string $uuid = null, array $nodes = null, array $ignoredNodes = null ) : string Create the query to get all documents from given webspace and language.
getExtensionData ( BasePageDocument $document, string $format ) : array Returns a flat array with the extensions of the given document.
getPathsByUuids ( $uuids ) : string[] Returns node path from given uuid.
getPropertiesContentData ( PropertyMetadata[] $properties, $propertyValues, $format ) : array Returns the Content as a flat array.
getPropertyData ( PropertyMetadata $property, PropertyValue $propertyValue, string $format ) : array Creates and returns a property-array.
getSettingData ( BasePageDocument $document, string $format ) : array Returns a flat array with the settings of the given document.
getTemplate ( $format ) : string Returns export template for given format like XLIFF1.2.

Method Details

__construct() public method

public __construct ( Symfony\Component\Templating\EngineInterface $templating, Sulu\Component\DocumentManager\DocumentManager $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Content\Extension\ExtensionManagerInterface $extensionManager, Sulu\Component\Content\Export\ContentExportManagerInterface $contentExportManager, array $formatFilePaths )
$templating Symfony\Component\Templating\EngineInterface
$documentManager Sulu\Component\DocumentManager\DocumentManager
$documentInspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$structureManager Sulu\Component\Content\Compat\StructureManagerInterface
$extensionManager Sulu\Component\Content\Extension\ExtensionManagerInterface
$contentExportManager Sulu\Component\Content\Export\ContentExportManagerInterface
$formatFilePaths array

buildNodeUuidToPathWhere() protected method

Build query to return only specific nodes.
protected buildNodeUuidToPathWhere ( $nodes, boolean | false $not = false ) : string
$nodes
$not boolean | false
return string

createProperty() protected method

Returns a array with the given value (name, value and options).
protected createProperty ( $name, $value = null, array $options = [], string $type = '', array $children = null ) : array
$name
$value
$options array
$type string
$children array
return array

export() public method

public export ( $webspaceKey, $locale, $output, $format = '1.2.xliff', $uuid = null, $nodes = null, $ignoredNodes = null )

getBlockPropertyData() protected method

Creates and Returns a property-array for content-type Block.
protected getBlockPropertyData ( BlockMetadata $property, PropertyValue $propertyValue, $format ) : array
$property Sulu\Component\Content\Metadata\BlockMetadata
$propertyValue Sulu\Component\Content\Document\Structure\PropertyValue
$format
return array

getContentData() protected method

Returns a array of the given content data of the document.
protected getContentData ( BasePageDocument $document, $locale, $format ) : array
$document Sulu\Bundle\ContentBundle\Document\BasePageDocument
$locale
$format
return array

getDocuments() protected method

Returns all Documents from given webspace.
protected getDocuments ( string $webspaceKey, string $locale, string $uuid = null, array $nodes = null, array $ignoredNodes = null ) : array
$webspaceKey string
$locale string
$uuid string
$nodes array
$ignoredNodes array
return array

getDocumentsQueryString() protected method

Create the query to get all documents from given webspace and language.
protected getDocumentsQueryString ( $webspaceKey, $locale, string $uuid = null, array $nodes = null, array $ignoredNodes = null ) : string
$webspaceKey
$locale
$uuid string
$nodes array
$ignoredNodes array
return string

getExportData() public method

public getExportData ( $webspaceKey, $locale, $output = null, $format = '1.2.xliff', $uuid = null, $nodes = null, $ignoredNodes = null )

getExtensionData() protected method

Returns a flat array with the extensions of the given document.
protected getExtensionData ( BasePageDocument $document, string $format ) : array
$document Sulu\Bundle\ContentBundle\Document\BasePageDocument
$format string
return array

getPathsByUuids() protected method

Returns node path from given uuid.
protected getPathsByUuids ( $uuids ) : string[]
$uuids
return string[]

getPropertiesContentData() protected method

Returns the Content as a flat array.
protected getPropertiesContentData ( PropertyMetadata[] $properties, $propertyValues, $format ) : array
$properties Sulu\Component\Content\Metadata\PropertyMetadata[]
$propertyValues
$format
return array

getPropertyData() protected method

Creates and returns a property-array.
protected getPropertyData ( PropertyMetadata $property, PropertyValue $propertyValue, string $format ) : array
$property Sulu\Component\Content\Metadata\PropertyMetadata
$propertyValue Sulu\Component\Content\Document\Structure\PropertyValue
$format string
return array

getSettingData() protected method

Returns a flat array with the settings of the given document.
protected getSettingData ( BasePageDocument $document, string $format ) : array
$document Sulu\Bundle\ContentBundle\Document\BasePageDocument
$format string
return array

getTemplate() protected method

Returns export template for given format like XLIFF1.2.
protected getTemplate ( $format ) : string
$format
return string

Property Details

$contentExportManager protected_oe property

protected ContentExportManagerInterface,Sulu\Component\Content\Export $contentExportManager
return Sulu\Component\Content\Export\ContentExportManagerInterface

$documentInspector protected_oe property

protected EngineInterface,Symfony\Component\Templating $documentInspector
return Symfony\Component\Templating\EngineInterface

$documentManager protected_oe property

protected DocumentManager,Sulu\Component\DocumentManager $documentManager
return Sulu\Component\DocumentManager\DocumentManager

$extensionManager protected_oe property

protected ExtensionManagerInterface,Sulu\Component\Content\Extension $extensionManager
return Sulu\Component\Content\Extension\ExtensionManagerInterface

$formatFilePaths protected_oe property

protected string[] $formatFilePaths
return string[]

$structureManager protected_oe property

protected StructureManagerInterface,Sulu\Component\Content\Compat $structureManager
return Sulu\Component\Content\Compat\StructureManagerInterface

$templating protected_oe property

protected EngineInterface,Symfony\Component\Templating $templating
return Symfony\Component\Templating\EngineInterface