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
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__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