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

Наследование: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Показать файл Открыть проект

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

Метод Описание
__construct ( Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector, Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager )
getSubscribedEvents ( )
handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event ) Writes the history status of the node to the document.
handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Updates the route for the given document and creates history routes if necessary.
handlePublish ( Sulu\Component\DocumentManager\Event\PublishEvent $event ) Handles the history field for the route on publish.
handleRemove ( Sulu\Component\DocumentManager\Event\RemoveEvent $event ) Removes the routes for the given document and removes history routes if necessary.

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

Метод Описание
changeOldPathToHistoryRoutes ( Sulu\Component\Content\Document\Behavior\RouteBehavior $oldDocument, Sulu\Component\Content\Document\Behavior\RouteBehavior $newDocument ) Changes the old route to a history route and redirect to the new route.
recursivelyRemoveRoutes ( Sulu\Component\Content\Document\Behavior\RouteBehavior $document ) Remove given Route and his history.

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

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

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

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

public static getSubscribedEvents ( )

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

Writes the history status of the node to the document.
public handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event )
$event Sulu\Component\DocumentManager\Event\HydrateEvent

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

Updates the route for the given document and creates history routes if necessary.
public handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

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

Handles the history field for the route on publish.
public handlePublish ( Sulu\Component\DocumentManager\Event\PublishEvent $event )
$event Sulu\Component\DocumentManager\Event\PublishEvent

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

Removes the routes for the given document and removes history routes if necessary.
public handleRemove ( Sulu\Component\DocumentManager\Event\RemoveEvent $event )
$event Sulu\Component\DocumentManager\Event\RemoveEvent