PHP Class Sulu\Component\Content\Types\ResourceLocator\Mapper\PhpcrMapper

Inheritance: implements Sulu\Component\Content\Types\ResourceLocator\Mapper\ResourceLocatorMapperInterface
Show file Open project: sulu/sulu

Public Methods

Method Description
__construct ( Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector )
deleteByPath ( $path, $webspaceKey, $languageCode, $segmentKey = null )
getParentPath ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )
getUniquePath ( $path, $webspaceKey, $languageCode, $segmentKey = null )
loadByContent ( PHPCR\NodeInterface $contentNode, $webspaceKey, $languageCode, $segmentKey = null )
loadByContentUuid ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )
loadByResourceLocator ( $resourceLocator, $webspaceKey, $languageCode, $segmentKey = null )
loadHistoryByContentUuid ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )
save ( Sulu\Component\Content\Document\Behavior\ResourceSegmentBehavior $document )
unique ( $path, $webspaceKey, $languageCode, $segmentKey = null )

Private Methods

Method Description
getPath ( string $relPath, string $webspaceKey, string $languageCode, string $segmentKey ) : string Returns the abspath.
getResourceLocator ( string $path, string $webspaceKey, string $languageCode, string $segmentKey ) : string Returns resource-locator.
getWebspaceRouteNode ( string $webspaceKey, string $languageCode, string $segmentKey ) : PHPCR\NodeInterface Returns base node of routes from phpcr.
getWebspaceRouteNodeBasePath ( string $webspaceKey, string $languageCode, string $segmentKey ) : string Returns base path of routes from phpcr.
isUnique ( PHPCR\NodeInterface $root, string $path ) : boolean Check if path is unique from given $root node.
iterateRouteNodes ( PHPCR\NodeInterface $node, callable $callback, string $webspaceKey, string $languageCode, string $segmentKey = null ) : PHPCR\NodeInterface Iterates over all route nodes assigned by the given node, and executes the callback on it.

Method Details

__construct() public method

public __construct ( Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector )
$sessionManager Sulu\Component\PHPCR\SessionManager\SessionManagerInterface
$documentManager Sulu\Component\DocumentManager\DocumentManagerInterface
$documentInspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector

deleteByPath() public method

public deleteByPath ( $path, $webspaceKey, $languageCode, $segmentKey = null )

getParentPath() public method

public getParentPath ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )

getUniquePath() public method

public getUniquePath ( $path, $webspaceKey, $languageCode, $segmentKey = null )

loadByContent() public method

public loadByContent ( PHPCR\NodeInterface $contentNode, $webspaceKey, $languageCode, $segmentKey = null )
$contentNode PHPCR\NodeInterface

loadByContentUuid() public method

public loadByContentUuid ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )

loadByResourceLocator() public method

public loadByResourceLocator ( $resourceLocator, $webspaceKey, $languageCode, $segmentKey = null )

loadHistoryByContentUuid() public method

public loadHistoryByContentUuid ( $uuid, $webspaceKey, $languageCode, $segmentKey = null )

save() public method

public save ( Sulu\Component\Content\Document\Behavior\ResourceSegmentBehavior $document )
$document Sulu\Component\Content\Document\Behavior\ResourceSegmentBehavior

unique() public method

public unique ( $path, $webspaceKey, $languageCode, $segmentKey = null )