PHP 클래스 Sulu\Component\Content\Document\Subscriber\WorkflowStageSubscriber

상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__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