PHP Класс Sulu\Component\Content\Document\Subscriber\ResourceSegmentSubscriber

Наследование: extends Sulu\Component\Content\Document\Subscriber\AbstractMappingSubscriber
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Sulu\Component\DocumentManager\PropertyEncoder $encoder, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, PHPCR\SessionInterface $defaultSession, PHPCR\SessionInterface $liveSession )
getSubscribedEvents ( )
handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event ) Sets the ResourceSegment of the document.
handlePersistDocument ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Sets the ResourceSegment on the Structure.
handlePersistRoute ( Sulu\Component\DocumentManager\Event\PublishEvent $event ) Creates or updates the route for the document.
supports ( object $document ) : boolean Checks if the given Document supports the operations done in this Subscriber.
updateCopiedDocument ( Sulu\Component\DocumentManager\Event\CopyEvent $event ) Copy the routes for all localization of the document in the event.
updateMovedDocument ( Sulu\Component\DocumentManager\Event\MoveEvent $event ) Moves the routes for all localizations of the document in the event.

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

Метод Описание
getResourceSegmentProperty ( $document ) : PropertyMetadata Returns the property of the document's structure containing the ResourceSegment.
persistDocument ( Sulu\Component\Content\Document\Behavior\ResourceSegmentBehavior $document, PropertyMetadata $property ) Sets the ResourceSegment to the given property of the given document.
persistRoute ( Sulu\Component\Content\Document\Behavior\ResourceSegmentBehavior $document ) Creates or updates the route of the document using the RlpStrategy.
updateResourceSegmentProperty ( PHPCR\NodeInterface $node, string $resourceSegmentPropertyName, string $parentUuid, string $webspaceKey, string $locale ) Updates the property for the resource segment on the given node.
updateRoute ( object $document, boolean $generateRoutes ) Updates the route for the given document after a move or copy.

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

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

public __construct ( Sulu\Component\DocumentManager\PropertyEncoder $encoder, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, PHPCR\SessionInterface $defaultSession, PHPCR\SessionInterface $liveSession )
$encoder Sulu\Component\DocumentManager\PropertyEncoder
$documentManager Sulu\Component\DocumentManager\DocumentManagerInterface
$documentInspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$resourceLocatorStrategyPool Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface
$defaultSession PHPCR\SessionInterface
$liveSession PHPCR\SessionInterface

getSubscribedEvents() публичный статический Метод

public static getSubscribedEvents ( )

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

Sets the ResourceSegment of the document.
public handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )
$event Sulu\Component\DocumentManager\Event\AbstractMappingEvent

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

Sets the ResourceSegment on the Structure.
public handlePersistDocument ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

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

Creates or updates the route for the document.
public handlePersistRoute ( Sulu\Component\DocumentManager\Event\PublishEvent $event )
$event Sulu\Component\DocumentManager\Event\PublishEvent

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

Checks if the given Document supports the operations done in this Subscriber.
public supports ( object $document ) : boolean
$document object
Результат boolean

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

Copy the routes for all localization of the document in the event.
public updateCopiedDocument ( Sulu\Component\DocumentManager\Event\CopyEvent $event )
$event Sulu\Component\DocumentManager\Event\CopyEvent

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

Moves the routes for all localizations of the document in the event.
public updateMovedDocument ( Sulu\Component\DocumentManager\Event\MoveEvent $event )
$event Sulu\Component\DocumentManager\Event\MoveEvent