PHP 클래스 Sulu\Bundle\ContentBundle\Document\Subscriber\PublishSubscriber

상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
파일 보기 프로젝트 열기: sulu/sulu

공개 메소드들

메소드 설명
__construct ( PHPCR\SessionInterface $liveSession, Sulu\Component\DocumentManager\NodeHelperInterface $nodeHelper, PropertyEncoder $propertyEncoder )
copyNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\CopyEvent $event ) If a node is copied a node with the same UUID will be created in the live session.
copyPropertiesFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\RemoveDraftEvent $event )
createNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Creates the node with the same UUID in the public workspace if it does not exist yet. In case it does it will be renamed if necessary.
flushPublicWorkspace ( ) Flushes the live session.
getSubscribedEvents ( )
moveNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\MoveEvent $event ) Since moving is not draftable the node will also be moved in the live session immediately.
removeNodeFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\RemoveEvent $event ) Since deleting is not draftable the node will be deleted in the live session as soon as it is deleted in the default session.
removePropertiesFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event ) Removes all the properties for the given locale from the node, so that the content is not accessible anymore from the live workspace.
reorderNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\ReorderEvent $event ) Reordering is also not draftable, and therefore also immediately applied to the live session.
setNodeFromPublicWorkspaceForPublishing ( Sulu\Component\DocumentManager\Event\PublishEvent $event ) Sets the correct node from the live session for the PublishEvent.
setNodeFromPublicWorkspaceForUnpublishing ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event ) Sets the correct node from the live session for the UnpublishEvent.

비공개 메소드들

메소드 설명
copyNodeWithChildrenInPublicWorkspace ( PHPCR\NodeInterface $node )
createNodesWithUuid ( PHPCR\NodeInterface $node ) Creates every node on the path to the given node. Also uses the same UUIDs for these nodes.
getLiveNode ( Sulu\Component\DocumentManager\Behavior\Mapping\PathBehavior $document ) : PHPCR\NodeInterface Returns the live node for given document.
removeLocalizedNodeProperties ( PHPCR\NodeInterface $node, string $locale ) Removes all localized properties in the given locale from the given node.
setNodeFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\PublishEvent | Sulu\Component\DocumentManager\Event\UnpublishEvent $event ) Sets the node from the live workspace on the given event.

메소드 상세

__construct() 공개 메소드

public __construct ( PHPCR\SessionInterface $liveSession, Sulu\Component\DocumentManager\NodeHelperInterface $nodeHelper, PropertyEncoder $propertyEncoder )
$liveSession PHPCR\SessionInterface
$nodeHelper Sulu\Component\DocumentManager\NodeHelperInterface
$propertyEncoder Sulu\Bundle\DocumentManagerBundle\Bridge\PropertyEncoder

copyNodeInPublicWorkspace() 공개 메소드

If a node is copied a node with the same UUID will be created in the live session.
public copyNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\CopyEvent $event )
$event Sulu\Component\DocumentManager\Event\CopyEvent

copyPropertiesFromPublicWorkspace() 공개 메소드

public copyPropertiesFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\RemoveDraftEvent $event )
$event Sulu\Component\DocumentManager\Event\RemoveDraftEvent

createNodeInPublicWorkspace() 공개 메소드

Creates the node with the same UUID in the public workspace if it does not exist yet. In case it does it will be renamed if necessary.
public createNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

flushPublicWorkspace() 공개 메소드

Flushes the live session.

getSubscribedEvents() 공개 정적인 메소드

public static getSubscribedEvents ( )

moveNodeInPublicWorkspace() 공개 메소드

Since moving is not draftable the node will also be moved in the live session immediately.
public moveNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\MoveEvent $event )
$event Sulu\Component\DocumentManager\Event\MoveEvent

removeNodeFromPublicWorkspace() 공개 메소드

Since deleting is not draftable the node will be deleted in the live session as soon as it is deleted in the default session.
public removeNodeFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\RemoveEvent $event )
$event Sulu\Component\DocumentManager\Event\RemoveEvent

removePropertiesFromPublicWorkspace() 공개 메소드

Removes all the properties for the given locale from the node, so that the content is not accessible anymore from the live workspace.
public removePropertiesFromPublicWorkspace ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event )
$event Sulu\Component\DocumentManager\Event\UnpublishEvent

reorderNodeInPublicWorkspace() 공개 메소드

Reordering is also not draftable, and therefore also immediately applied to the live session.
public reorderNodeInPublicWorkspace ( Sulu\Component\DocumentManager\Event\ReorderEvent $event )
$event Sulu\Component\DocumentManager\Event\ReorderEvent

setNodeFromPublicWorkspaceForPublishing() 공개 메소드

Sets the correct node from the live session for the PublishEvent.
public setNodeFromPublicWorkspaceForPublishing ( Sulu\Component\DocumentManager\Event\PublishEvent $event )
$event Sulu\Component\DocumentManager\Event\PublishEvent

setNodeFromPublicWorkspaceForUnpublishing() 공개 메소드

Sets the correct node from the live session for the UnpublishEvent.
public setNodeFromPublicWorkspaceForUnpublishing ( Sulu\Component\DocumentManager\Event\UnpublishEvent $event )
$event Sulu\Component\DocumentManager\Event\UnpublishEvent