PHP 클래스 Neos\ContentRepository\Domain\Model\Workspace

파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$baseWorkspace Workspace Content from the base workspace will shine through in this workspace as long as they are not modified in this workspace.
$description string An optional user-defined description
$name string
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeService Neos\ContentRepository\Domain\Service\NodeServiceInterface
$now Neos\Flow\Utility\Now
$owner string We can't use a real many-to-many relation here, because the User implementation will come from a different package (e.g. Neos) which ContentRepository does not depend on. This relation may be implemented with a target entity listener at a later stage, when we implemented support for it in Flow core. See also: http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/cookbook/resolve-target-entity-listener.html
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$publishingService Neos\ContentRepository\Domain\Service\PublishingServiceInterface
$reflectionService Neos\Flow\Reflection\ReflectionService
$rootNodeData NodeData Root node data of this workspace
$title string A user-defined, human-friendly title for this workspace

공개 메소드들

메소드 설명
__construct ( string $name, Workspace $baseWorkspace = null, Neos\ContentRepository\Domain\Model\UserInterface $owner = null ) Constructs a new workspace
getBaseWorkspace ( ) : Workspace Returns the base workspace, if any
getBaseWorkspaces ( ) : Workspace[] Returns all base workspaces, if any
getDescription ( ) : string Returns the workspace description
getName ( ) : string Returns the name of this workspace
getNodeCount ( ) : integer Returns the number of nodes in this workspace.
getOwner ( ) : Neos\ContentRepository\Domain\Model\UserInterface Returns the workspace owner.
getRootNodeData ( ) : NodeData Returns the root node data of this workspace
getTitle ( ) : string Returns the workspace title
initializeObject ( integer $initializationCause ) : void Initializes this workspace.
isInternalWorkspace ( ) : boolean Checks if this workspace is shared across all editors
isPersonalWorkspace ( ) : boolean Checks if this workspace is a user's personal workspace
isPrivateWorkspace ( ) : boolean Checks if this workspace is shared only across users with access to internal workspaces, for example "reviewers"
isPublicWorkspace ( ) : boolean Checks if this workspace is public to everyone, even without authentication
publish ( Workspace $targetWorkspace ) : void Publishes the content of this workspace to another workspace.
publishNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void Publishes the given node to the target workspace.
publishNodes ( array $nodes, Workspace $targetWorkspace ) : void Publishes the given nodes to the target workspace.
setBaseWorkspace ( Workspace $baseWorkspace ) : void Sets the base workspace
setDescription ( string $description ) : void Sets the workspace description
setOwner ( Neos\ContentRepository\Domain\Model\UserInterface | string $user ) Returns the workspace owner.
setTitle ( string $title ) : void Sets workspace title

보호된 메소드들

메소드 설명
adjustShadowNodeData ( NodeData $shadowNodeData, NodeData $publishedNodeData, Workspace $targetWorkspace, NodeData $targetNodeData ) : void Adjust the given $shadowNodeData by removing it or moving it to the $targetWorkspace, as needed.
adjustShadowNodePath ( NodeData $shadowNodeData, $path, Workspace $targetWorkspace, array $dimensionValues ) : void Adjusts the path of $shadowNodeData to $path, if needed/possible.
emitAfterNodePublishing ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void Emits a signal when a node has been published.
emitBaseWorkspaceChanged ( Workspace $workspace, Workspace $oldBaseWorkspace = null, Workspace $newBaseWorkspace = null ) : void Emits a signal after the base workspace has been changed
emitBeforeNodePublishing ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void Emits a signal just before a node is being published
findNodeDataInTargetWorkspace ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : NodeData Returns the NodeData instance with the given identifier from the target workspace.
handleShadowNodeData ( NodeData $publishedNodeData, Workspace $targetWorkspace, NodeData $targetNodeData ) : boolean Look for a shadow node of $publishedNodeData either adjust or remove it based on $targetWorkspace if the shadow node is marked as removed.
moveNodeVariantToTargetWorkspace ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void Move the given node instance to the target workspace
replaceNodeData ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeData $targetNodeData ) : void Replace the node data of a node instance with a given target node data
verifyPublishingTargetWorkspace ( Workspace $targetWorkspace ) : void Checks if the specified workspace is a base workspace of this workspace and if not, throws an exception

메소드 상세

__construct() 공개 메소드

Constructs a new workspace
public __construct ( string $name, Workspace $baseWorkspace = null, Neos\ContentRepository\Domain\Model\UserInterface $owner = null )
$name string Name of this workspace
$baseWorkspace Workspace A workspace this workspace is based on (if any)
$owner Neos\ContentRepository\Domain\Model\UserInterface The user that created the workspace (if any, "system" workspaces have none)

adjustShadowNodeData() 보호된 메소드

Adjust the given $shadowNodeData by removing it or moving it to the $targetWorkspace, as needed.
protected adjustShadowNodeData ( NodeData $shadowNodeData, NodeData $publishedNodeData, Workspace $targetWorkspace, NodeData $targetNodeData ) : void
$shadowNodeData NodeData
$publishedNodeData NodeData
$targetWorkspace Workspace
$targetNodeData NodeData
리턴 void

adjustShadowNodePath() 보호된 메소드

If the $path is occupied in $targetWorkspace, the shadow is removed.
protected adjustShadowNodePath ( NodeData $shadowNodeData, $path, Workspace $targetWorkspace, array $dimensionValues ) : void
$shadowNodeData NodeData
$path
$targetWorkspace Workspace
$dimensionValues array
리턴 void

emitAfterNodePublishing() 보호된 메소드

The signal emits the source node and target workspace, i.e. the node contains its source workspace.
protected emitAfterNodePublishing ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node that was published
$targetWorkspace Workspace The publishing target workspace
리턴 void

emitBaseWorkspaceChanged() 보호된 메소드

Emits a signal after the base workspace has been changed
protected emitBaseWorkspaceChanged ( Workspace $workspace, Workspace $oldBaseWorkspace = null, Workspace $newBaseWorkspace = null ) : void
$workspace Workspace This workspace
$oldBaseWorkspace Workspace The workspace which was the base workspace before the change
$newBaseWorkspace Workspace The new base workspace
리턴 void

emitBeforeNodePublishing() 보호된 메소드

The signal emits the source node and target workspace, i.e. the node contains its source workspace.
protected emitBeforeNodePublishing ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to be published
$targetWorkspace Workspace The publishing target workspace
리턴 void

findNodeDataInTargetWorkspace() 보호된 메소드

If no NodeData instance is found, null is returned.
protected findNodeDataInTargetWorkspace ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : NodeData
$node Neos\ContentRepository\Domain\Model\NodeInterface
$targetWorkspace Workspace
리턴 NodeData

getBaseWorkspace() 공개 메소드

Returns the base workspace, if any
public getBaseWorkspace ( ) : Workspace
리턴 Workspace

getBaseWorkspaces() 공개 메소드

Returns all base workspaces, if any
public getBaseWorkspaces ( ) : Workspace[]
리턴 Workspace[]

getDescription() 공개 메소드

Returns the workspace description
public getDescription ( ) : string
리턴 string

getName() 공개 메소드

Returns the name of this workspace
public getName ( ) : string
리턴 string Name of this workspace

getNodeCount() 공개 메소드

If $includeBaseWorkspaces is enabled, also nodes of base workspaces are taken into account. If it is disabled (default) then the number of nodes is the actual number (+1) of changes related to its base workspaces. A node count of 1 means that no changes are pending in this workspace because a workspace always contains at least its Root Node.
public getNodeCount ( ) : integer
리턴 integer

getOwner() 공개 메소드

Returns the workspace owner.
public getOwner ( ) : Neos\ContentRepository\Domain\Model\UserInterface
리턴 Neos\ContentRepository\Domain\Model\UserInterface

getRootNodeData() 공개 메소드

Returns the root node data of this workspace
public getRootNodeData ( ) : NodeData
리턴 NodeData

getTitle() 공개 메소드

Returns the workspace title
public getTitle ( ) : string
리턴 string

handleShadowNodeData() 보호된 메소드

Look for a shadow node of $publishedNodeData either adjust or remove it based on $targetWorkspace if the shadow node is marked as removed.
protected handleShadowNodeData ( NodeData $publishedNodeData, Workspace $targetWorkspace, NodeData $targetNodeData ) : boolean
$publishedNodeData NodeData
$targetWorkspace Workspace
$targetNodeData NodeData
리턴 boolean false if no shadow node was found, true otherwise

initializeObject() 공개 메소드

If this workspace is brand new, a root node is created automatically.
public initializeObject ( integer $initializationCause ) : void
$initializationCause integer
리턴 void

isInternalWorkspace() 공개 메소드

Checks if this workspace is shared across all editors
public isInternalWorkspace ( ) : boolean
리턴 boolean

isPersonalWorkspace() 공개 메소드

Checks if this workspace is a user's personal workspace
public isPersonalWorkspace ( ) : boolean
리턴 boolean

isPrivateWorkspace() 공개 메소드

Checks if this workspace is shared only across users with access to internal workspaces, for example "reviewers"
public isPrivateWorkspace ( ) : boolean
리턴 boolean

isPublicWorkspace() 공개 메소드

Checks if this workspace is public to everyone, even without authentication
public isPublicWorkspace ( ) : boolean
리턴 boolean

moveNodeVariantToTargetWorkspace() 보호된 메소드

If no target node variant (having the same dimension values) exists in the target workspace, the node that is published will be used as a new node variant in the target workspace.
protected moveNodeVariantToTargetWorkspace ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to publish
$targetWorkspace Workspace The workspace to publish to
리턴 void

publish() 공개 메소드

The specified workspace must be a base workspace of this workspace.
public publish ( Workspace $targetWorkspace ) : void
$targetWorkspace Workspace The workspace to publish to
리턴 void

publishNode() 공개 메소드

The specified workspace must be a base workspace of this workspace.
public publishNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to publish
$targetWorkspace Workspace The workspace to publish to
리턴 void

publishNodes() 공개 메소드

The specified workspace must be a base workspace of this workspace.
public publishNodes ( array $nodes, Workspace $targetWorkspace ) : void
$nodes array
$targetWorkspace Workspace The workspace to publish to
리턴 void

replaceNodeData() 보호된 메소드

The node data of the node that is published will be removed and the existing node data inside the target workspace is updated to the changes and will be injected into the node instance. If the node was marked as removed, both node data are removed.
protected replaceNodeData ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeData $targetNodeData ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node instance with node data to be published
$targetNodeData NodeData The existing node data in the target workspace
리턴 void

setBaseWorkspace() 공개 메소드

Note that this method is not part of the public API because further action is necessary for rebasing a workspace
public setBaseWorkspace ( Workspace $baseWorkspace ) : void
$baseWorkspace Workspace
리턴 void

setDescription() 공개 메소드

Sets the workspace description
public setDescription ( string $description ) : void
$description string
리턴 void

setOwner() 공개 메소드

Returns the workspace owner.
public setOwner ( Neos\ContentRepository\Domain\Model\UserInterface | string $user )
$user Neos\ContentRepository\Domain\Model\UserInterface | string The new user, or user's UUID

setTitle() 공개 메소드

Sets workspace title
public setTitle ( string $title ) : void
$title string
리턴 void

verifyPublishingTargetWorkspace() 보호된 메소드

Checks if the specified workspace is a base workspace of this workspace and if not, throws an exception
protected verifyPublishingTargetWorkspace ( Workspace $targetWorkspace ) : void
$targetWorkspace Workspace The publishing target workspace
리턴 void

프로퍼티 상세

$baseWorkspace 보호되어 있는 프로퍼티

Content from the base workspace will shine through in this workspace as long as they are not modified in this workspace.
protected Workspace,Neos\ContentRepository\Domain\Model $baseWorkspace
리턴 Workspace

$description 보호되어 있는 프로퍼티

An optional user-defined description
protected string $description
리턴 string

$name 보호되어 있는 프로퍼티

protected string $name
리턴 string

$nodeDataRepository 보호되어 있는 프로퍼티

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
리턴 Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeService 보호되어 있는 프로퍼티

protected NodeServiceInterface,Neos\ContentRepository\Domain\Service $nodeService
리턴 Neos\ContentRepository\Domain\Service\NodeServiceInterface

$now 보호되어 있는 프로퍼티

protected Now,Neos\Flow\Utility $now
리턴 Neos\Flow\Utility\Now

$owner 보호되어 있는 프로퍼티

We can't use a real many-to-many relation here, because the User implementation will come from a different package (e.g. Neos) which ContentRepository does not depend on. This relation may be implemented with a target entity listener at a later stage, when we implemented support for it in Flow core. See also: http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/cookbook/resolve-target-entity-listener.html
protected string $owner
리턴 string

$persistenceManager 보호되어 있는 프로퍼티

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
리턴 Neos\Flow\Persistence\PersistenceManagerInterface

$publishingService 보호되어 있는 프로퍼티

protected PublishingServiceInterface,Neos\ContentRepository\Domain\Service $publishingService
리턴 Neos\ContentRepository\Domain\Service\PublishingServiceInterface

$reflectionService 보호되어 있는 프로퍼티

protected ReflectionService,Neos\Flow\Reflection $reflectionService
리턴 Neos\Flow\Reflection\ReflectionService

$rootNodeData 보호되어 있는 프로퍼티

Root node data of this workspace
protected NodeData,Neos\ContentRepository\Domain\Model $rootNodeData
리턴 NodeData

$title 보호되어 있는 프로퍼티

A user-defined, human-friendly title for this workspace
protected string $title
리턴 string