interface PublishingServiceInterface (View source)

ContentRepository Publishing Service Interface

Methods

getUnpublishedNodes(Workspace $workspace)

Returns a list of nodes contained in the given workspace which are not yet published

int
getUnpublishedNodesCount(Workspace $workspace)

Returns the number of unpublished nodes contained in the given workspace

void
publishNode(NodeInterface $node, Workspace $targetWorkspace = null)

Publishes the given node to the specified target workspace. If no workspace is specified, "live" is assumed.

void
publishNodes(array $nodes, Workspace $targetWorkspace = null)

Publishes the given nodes to the specified target workspace. If no workspace is specified, "live" is assumed.

void
discardNode(NodeInterface $node)

Discards the given node.

void
discardNodes(array $nodes)

Discards the given nodes.

void
discardAllNodes(Workspace $workspace)

Discards all unpublished nodes of the given workspace.

Details

NodeInterface[] getUnpublishedNodes(Workspace $workspace)

Returns a list of nodes contained in the given workspace which are not yet published

Parameters

Workspace $workspace

Return Value

NodeInterface[]

int getUnpublishedNodesCount(Workspace $workspace)

Returns the number of unpublished nodes contained in the given workspace

Parameters

Workspace $workspace

Return Value

int

void publishNode(NodeInterface $node, Workspace $targetWorkspace = null)

Publishes the given node to the specified target workspace. If no workspace is specified, "live" is assumed.

Parameters

NodeInterface $node
Workspace $targetWorkspace

If not set the "live" workspace is assumed to be the publishing target

Return Value

void

void publishNodes(array $nodes, Workspace $targetWorkspace = null)

Publishes the given nodes to the specified target workspace. If no workspace is specified, "live" is assumed.

Parameters

array $nodes

The nodes to publish

Workspace $targetWorkspace

If not set the "live" workspace is assumed to be the publishing target

Return Value

void

void discardNode(NodeInterface $node)

Discards the given node.

Parameters

NodeInterface $node

Return Value

void

Exceptions

WorkspaceException

void discardNodes(array $nodes)

Discards the given nodes.

Parameters

array $nodes

The nodes to discard

Return Value

void

void discardAllNodes(Workspace $workspace)

Discards all unpublished nodes of the given workspace.

Parameters

Workspace $workspace

The workspace to flush, can't be the live workspace

Return Value

void

Exceptions

WorkspaceException