PHP 클래스 Sulu\Component\Content\Mapper\ContentMapper

사용 중단: since 1.0-? use the DocumentManager instead
상속: implements Sulu\Component\Content\Mapper\ContentMapperInterface
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Sulu\Component\DocumentManager\DocumentManager $documentManager, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, Symfony\Component\Form\FormFactoryInterface $formFactory, DocumentInspector $inspector, PropertyEncoder $encoder, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Content\Extension\ExtensionManagerInterface $extensionManager, Sulu\Component\Content\ContentTypeManagerInterface $contentTypeManager, Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, Sulu\Component\DocumentManager\NamespaceRegistry $namespaceRegistry )
convertQueryResultToArray ( PHPCR\Query\QueryResultInterface $queryResult, $webspaceKey, $locales, $fields, $maxDepth, $onlyPublished = true )
copyLanguage ( $uuid, $userId, $webspaceKey, $srcLocale, $destLocales, $structureType = LegacyStructure::TYPE_PAGE )
delete ( $uuid, $webspaceKey )
getResourceLocator ( ) : Sulu\Component\Content\Types\ResourceLocatorInterface Return the resource locator content type.
load ( $uuid, $webspaceKey, $locale, $loadGhostContent = false )
loadBreadcrumb ( $uuid, $locale, $webspaceKey )
loadByNode ( PHPCR\NodeInterface $node, $locale, $webspaceKey = null, $excludeGhost = true, $loadGhostContent = false, $excludeShadow = true )
loadByParent ( $uuid, $webspaceKey, $languageCode, $depth = 1, $flat = true, $ignoreExceptions = false, $excludeGhosts = false )
loadByQuery ( PHPCR\Query\QueryInterface $query, $locale, $webspaceKey = null, $excludeGhost = true, $loadGhostContent = false )
loadBySql2 ( $sql2, $locale, $webspaceKey, $limit = null )
loadNodeAndAncestors ( $uuid, $locale, $webspaceKey = null, $excludeGhost = true, $excludeShadow = true )
loadShallowStructureByNode ( PHPCR\NodeInterface $contentNode, string $localization, string $webspaceKey ) : Sulu\Component\Content\Compat\StructureInterface Load/hydrate a shalow structure with the given node.
loadStartPage ( $webspaceKey, $locale )
orderAt ( $uuid, $position, $userId, $webspaceKey, $locale ) TODO: Move this logic to the DocumentManager {@inheritdoc}
orderBefore ( $uuid, $beforeUuid, $userId, $webspaceKey, $locale )
saveExtension ( $uuid, $data, $extensionName, $webspaceKey, $locale, $userId ) TODO: Refactor this .

보호된 메소드들

메소드 설명
getRootRouteNode ( $webspaceKey, string $locale, string $segment ) : PHPCR\NodeInterface Return the node in the content repository which contains all of the routes.

비공개 메소드들

메소드 설명
documentToStructure ( DocumentInterface $document ) : StructureBridge Return a structure bridge corresponding to the given document.
documentsToStructureCollection ( object[] $documents, array | null $filterOptions = null ) Return a collection of structures for the given documents, optionally filtering according to the given options (as defined in optionsShouldExcludeDocument).
getContentDocument ( $webspaceKey, $locale, array $options = [] ) : Document Return the content document (aka the home page).
getExtensionData ( PHPCR\NodeInterface $node, Sulu\Component\Content\Extension\ExtensionInterface $extension, $propertyName, $webspaceKey, $locale ) Returns data for extension and property name.
getFieldData ( $field, Row $row, PHPCR\NodeInterface $node, $document, $templateKey, $webspaceKey, $locale ) Return data for one field.
getFieldsData ( Row $row, PHPCR\NodeInterface $node, $document, $fields, $templateKey, $webspaceKey, $locale ) Return extracted data (configured by fields array) from node.
getPropertyData ( $document, Property $property ) Returns data for property.
initializeExtensionCache ( ) Initializes cache of extension data.
loadDocument ( $pathOrUuid, $locale, $options, $shouldExclude = true )
loadExtensionData ( PHPCR\NodeInterface $node, Sulu\Component\Content\Extension\ExtensionInterface $extension, $webspaceKey, $locale ) load data from extension.
optionsShouldExcludeDocument ( $document, array $options = null )
rowToArray ( Row $row, $locale, $webspaceKey, $fields, $onlyPublished = true ) converts a query row to an array.

메소드 상세

__construct() 공개 메소드

public __construct ( Sulu\Component\DocumentManager\DocumentManager $documentManager, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, Symfony\Component\Form\FormFactoryInterface $formFactory, DocumentInspector $inspector, PropertyEncoder $encoder, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Content\Extension\ExtensionManagerInterface $extensionManager, Sulu\Component\Content\ContentTypeManagerInterface $contentTypeManager, Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, Sulu\Component\DocumentManager\NamespaceRegistry $namespaceRegistry )
$documentManager Sulu\Component\DocumentManager\DocumentManager
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface
$formFactory Symfony\Component\Form\FormFactoryInterface
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$encoder Sulu\Bundle\DocumentManagerBundle\Bridge\PropertyEncoder
$structureManager Sulu\Component\Content\Compat\StructureManagerInterface
$extensionManager Sulu\Component\Content\Extension\ExtensionManagerInterface
$contentTypeManager Sulu\Component\Content\ContentTypeManagerInterface
$sessionManager Sulu\Component\PHPCR\SessionManager\SessionManagerInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$resourceLocatorStrategyPool Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface
$namespaceRegistry Sulu\Component\DocumentManager\NamespaceRegistry

convertQueryResultToArray() 공개 메소드

public convertQueryResultToArray ( PHPCR\Query\QueryResultInterface $queryResult, $webspaceKey, $locales, $fields, $maxDepth, $onlyPublished = true )
$queryResult PHPCR\Query\QueryResultInterface

copyLanguage() 공개 메소드

public copyLanguage ( $uuid, $userId, $webspaceKey, $srcLocale, $destLocales, $structureType = LegacyStructure::TYPE_PAGE )

delete() 공개 메소드

public delete ( $uuid, $webspaceKey )

getResourceLocator() 공개 메소드

Return the resource locator content type.
public getResourceLocator ( ) : Sulu\Component\Content\Types\ResourceLocatorInterface
리턴 Sulu\Component\Content\Types\ResourceLocatorInterface

getRootRouteNode() 보호된 메소드

Return the node in the content repository which contains all of the routes.
protected getRootRouteNode ( $webspaceKey, string $locale, string $segment ) : PHPCR\NodeInterface
$webspaceKey
$locale string
$segment string
리턴 PHPCR\NodeInterface

load() 공개 메소드

public load ( $uuid, $webspaceKey, $locale, $loadGhostContent = false )

loadBreadcrumb() 공개 메소드

public loadBreadcrumb ( $uuid, $locale, $webspaceKey )

loadByNode() 공개 메소드

public loadByNode ( PHPCR\NodeInterface $node, $locale, $webspaceKey = null, $excludeGhost = true, $loadGhostContent = false, $excludeShadow = true )
$node PHPCR\NodeInterface

loadByParent() 공개 메소드

public loadByParent ( $uuid, $webspaceKey, $languageCode, $depth = 1, $flat = true, $ignoreExceptions = false, $excludeGhosts = false )

loadByQuery() 공개 메소드

public loadByQuery ( PHPCR\Query\QueryInterface $query, $locale, $webspaceKey = null, $excludeGhost = true, $loadGhostContent = false )
$query PHPCR\Query\QueryInterface

loadBySql2() 공개 메소드

public loadBySql2 ( $sql2, $locale, $webspaceKey, $limit = null )

loadNodeAndAncestors() 공개 메소드

public loadNodeAndAncestors ( $uuid, $locale, $webspaceKey = null, $excludeGhost = true, $excludeShadow = true )

loadShallowStructureByNode() 공개 메소드

Shallow structures do not have content properties / extensions hydrated.
public loadShallowStructureByNode ( PHPCR\NodeInterface $contentNode, string $localization, string $webspaceKey ) : Sulu\Component\Content\Compat\StructureInterface
$contentNode PHPCR\NodeInterface
$localization string
$webspaceKey string
리턴 Sulu\Component\Content\Compat\StructureInterface

loadStartPage() 공개 메소드

public loadStartPage ( $webspaceKey, $locale )

orderAt() 공개 메소드

TODO: Move this logic to the DocumentManager {@inheritdoc}
public orderAt ( $uuid, $position, $userId, $webspaceKey, $locale )

orderBefore() 공개 메소드

public orderBefore ( $uuid, $beforeUuid, $userId, $webspaceKey, $locale )

saveExtension() 공개 메소드

. this should be handled in a listener or in the form, or something {@inheritdoc}
public saveExtension ( $uuid, $data, $extensionName, $webspaceKey, $locale, $userId )