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

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

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

Метод Описание
__construct ( Sulu\Component\DocumentManager\PropertyEncoder $propertyEncoder, Sulu\Component\DocumentManager\DocumentInspector $documentInspector, PHPCR\SessionInterface $defaultSession, PHPCR\SessionInterface $liveSession )
getSubscribedEvents ( )
setWorkflowStageOnDocument ( Sulu\Component\DocumentManager\Event\HydrateEvent $event ) Sets the workflow properties from the node on the document.
setWorkflowStageToPublished ( Sulu\Component\DocumentManager\Event\PublishEvent $event ) Sets the workflow stage for the passed document to published.
setWorkflowStageToTest ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Sets the workflow stage for the passed document to test.
setWorkflowStageToTestAndResetPublishedDate ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event ) Resets the workflowstage to test and the published date to null.
setWorkflowStageToTestForCopy ( Sulu\Component\DocumentManager\Event\CopyEvent $event ) Sets the workflowstage for the copied node and all its children to test. This is done because newly copied pages shouldn't be automatically published on the website.

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

Метод Описание
setNodeWorkflowStageToTestForCopy ( PHPCR\NodeInterface $node ) Sets the workflowstage and the published date for the given node and all of its children to test resp. null. This is done for every language in which the given properties exist.
setWorkflowStage ( Sulu\Component\Content\Document\Behavior\WorkflowStageBehavior $document, Sulu\Component\DocumentManager\DocumentAccessor $accessor, string $workflowStage, string $locale, string $live ) Sets the workflow properties on the given document.
setWorkflowStageOnNode ( PHPCR\NodeInterface $node, string $locale, integer $workflowStage, boolean $updatePublished ) Sets the workflow stage properties on the given node.
supports ( Sulu\Component\DocumentManager\Event\HydrateEvent | Sulu\Component\DocumentManager\Event\PublishEvent | Sulu\Component\DocumentManager\Event\PersistEvent $event ) : boolean Determines if the given document is supported by this subscriber.

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

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

public __construct ( Sulu\Component\DocumentManager\PropertyEncoder $propertyEncoder, Sulu\Component\DocumentManager\DocumentInspector $documentInspector, PHPCR\SessionInterface $defaultSession, PHPCR\SessionInterface $liveSession )
$propertyEncoder Sulu\Component\DocumentManager\PropertyEncoder
$documentInspector Sulu\Component\DocumentManager\DocumentInspector
$defaultSession PHPCR\SessionInterface
$liveSession PHPCR\SessionInterface

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

public static getSubscribedEvents ( )

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

Sets the workflow properties from the node on the document.
public setWorkflowStageOnDocument ( Sulu\Component\DocumentManager\Event\HydrateEvent $event )
$event Sulu\Component\DocumentManager\Event\HydrateEvent

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

Sets the workflow stage for the passed document to published.
public setWorkflowStageToPublished ( Sulu\Component\DocumentManager\Event\PublishEvent $event )
$event Sulu\Component\DocumentManager\Event\PublishEvent

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

Sets the workflow stage for the passed document to test.
public setWorkflowStageToTest ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

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

Resets the workflowstage to test and the published date to null.
public setWorkflowStageToTestAndResetPublishedDate ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event )
$event Sulu\Component\DocumentManager\Event\UnpublishEvent

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

Sets the workflowstage for the copied node and all its children to test. This is done because newly copied pages shouldn't be automatically published on the website.
public setWorkflowStageToTestForCopy ( Sulu\Component\DocumentManager\Event\CopyEvent $event )
$event Sulu\Component\DocumentManager\Event\CopyEvent