PHP Класс Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector

TODO: Add feature to the document manager to map inspectors for each document class
Наследование: extends Sulu\Component\DocumentManager\DocumentInspector
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Sulu\Component\DocumentManager\DocumentRegistry $documentRegistry, Sulu\Component\DocumentManager\PathSegmentRegistry $pathSegmentRegistry, Sulu\Component\DocumentManager\NamespaceRegistry $namespaceRegistry, Sulu\Component\DocumentManager\ProxyFactory $proxyFactory, Sulu\Component\DocumentManager\MetadataFactoryInterface $metadataFactory, Sulu\Component\Content\Metadata\Factory\StructureMetadataFactoryInterface $structureFactory, PropertyEncoder $encoder, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager )
getConcreteLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array Return locales which are not shadows.
getContentPath ( Sulu\Component\DocumentManager\Behavior\Mapping\PathBehavior $document ) : string Return the path of the document in relation to the content root.
getLocale ( $document ) : string | null Return the locale for the given document or null if the document is not managed.
getLocales ( object $document ) : array Return the concrete localizations for the given document.
getLocalizationState ( object $document ) : string Return the localization state of the node.
getLocalizedUrlsForPage ( BasePageDocument $page ) : array Returns urls for given page for all locales in webspace.
getMetadata ( object $document ) : Sulu\Component\DocumentManager\Metadata Return the (DocumentManager) Metadata for the given document.
getOriginalLocale ( object $document ) : string Return the original (requested) locale for this document before any fallback logic was applied to it.
getPublishedLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array Return the published locales for the given document.
getShadowLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array Return the enabled shadow locales for the given document.
getStructureMetadata ( Sulu\Component\Content\Document\Behavior\StructureBehavior $document ) : StructureMetadata Return the structure for the given StructureBehavior implementing document.
getWebspace ( object $document ) : string Return the webspace name for the given document.

Приватные методы

Метод Описание
extractWebspaceFromPath ( string $path ) : string Extracts webspace key from given path.

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

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

public __construct ( Sulu\Component\DocumentManager\DocumentRegistry $documentRegistry, Sulu\Component\DocumentManager\PathSegmentRegistry $pathSegmentRegistry, Sulu\Component\DocumentManager\NamespaceRegistry $namespaceRegistry, Sulu\Component\DocumentManager\ProxyFactory $proxyFactory, Sulu\Component\DocumentManager\MetadataFactoryInterface $metadataFactory, Sulu\Component\Content\Metadata\Factory\StructureMetadataFactoryInterface $structureFactory, PropertyEncoder $encoder, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager )
$documentRegistry Sulu\Component\DocumentManager\DocumentRegistry
$pathSegmentRegistry Sulu\Component\DocumentManager\PathSegmentRegistry
$namespaceRegistry Sulu\Component\DocumentManager\NamespaceRegistry
$proxyFactory Sulu\Component\DocumentManager\ProxyFactory
$metadataFactory Sulu\Component\DocumentManager\MetadataFactoryInterface
$structureFactory Sulu\Component\Content\Metadata\Factory\StructureMetadataFactoryInterface
$encoder PropertyEncoder
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface

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

Return locales which are not shadows.
public getConcreteLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array
$document Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior
Результат array

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

TODO: We need a better solution for retrieving webspace paths (the existing "session manager" is not a good solution).
public getContentPath ( Sulu\Component\DocumentManager\Behavior\Mapping\PathBehavior $document ) : string
$document Sulu\Component\DocumentManager\Behavior\Mapping\PathBehavior
Результат string

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

Return the locale for the given document or null if the document is not managed.
public getLocale ( $document ) : string | null
Результат string | null

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

Return the concrete localizations for the given document.
public getLocales ( object $document ) : array
$document object
Результат array

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

Return the localization state of the node.
public getLocalizationState ( object $document ) : string
$document object
Результат string

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

TODO: Implement a router service instead of this.
public getLocalizedUrlsForPage ( BasePageDocument $page ) : array
$page Sulu\Bundle\ContentBundle\Document\BasePageDocument
Результат array

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

Return the (DocumentManager) Metadata for the given document.
public getMetadata ( object $document ) : Sulu\Component\DocumentManager\Metadata
$document object
Результат Sulu\Component\DocumentManager\Metadata

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

Return the original (requested) locale for this document before any fallback logic was applied to it.
public getOriginalLocale ( object $document ) : string
$document object
Результат string

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

Return the published locales for the given document.
public getPublishedLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array
$document Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior
Результат array

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

Return the enabled shadow locales for the given document.
public getShadowLocales ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document ) : array
$document Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior
Результат array

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

Return the structure for the given StructureBehavior implementing document.
public getStructureMetadata ( Sulu\Component\Content\Document\Behavior\StructureBehavior $document ) : StructureMetadata
$document Sulu\Component\Content\Document\Behavior\StructureBehavior
Результат Sulu\Component\Content\Metadata\StructureMetadata

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

Return the webspace name for the given document.
public getWebspace ( object $document ) : string
$document object
Результат string