PHP Класс Neos\ContentRepository\Domain\Service\PublishingService

Наследование: implements Neos\ContentRepository\Domain\Service\PublishingServiceInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$contentDimensionPresetSource Neos\ContentRepository\Domain\Service\ContentDimensionPresetSourceInterface
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$workspaceRepository Neos\ContentRepository\Domain\Repository\WorkspaceRepository

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

Метод Описание
discardAllNodes ( Workspace $workspace ) : void Discards all unpublished nodes of the given workspace.
discardNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Discards the given node.
discardNodes ( array $nodes ) : void Discards the given nodes.
emitNodeDiscarded ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Signals that a node has been discarded.
emitNodePublished ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace = null ) : void Signals that a node has been published.
getUnpublishedNodes ( Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface> Returns a list of nodes contained in the given workspace which are not yet published
getUnpublishedNodesCount ( Workspace $workspace ) : integer Returns the number of unpublished nodes contained in the given workspace
publishNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace = null ) : void Publishes the given node to the specified target workspace. If no workspace is specified, the source workspace's base workspace is assumed.
publishNodes ( array $nodes, Workspace $targetWorkspace = null ) : void Publishes the given nodes to the specified target workspace. If no workspace is specified, the source workspace's base workspace is assumed.

Защищенные методы

Метод Описание
createContext ( Workspace $workspace, array $dimensionValues, array $contextProperties = [] ) : Context Creates a new content context based on the given workspace and the NodeData object.
doDiscardNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, array &$alreadyDiscardedNodeIdentifiers = [] ) : void Method which does the actual work of discarding, includes a protection against endless recursions and multiple discarding of the same node.
sortNodesForPublishing ( array $nodes ) : array Sort an unsorted list of nodes in a publishable order

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

createContext() защищенный Метод

Creates a new content context based on the given workspace and the NodeData object.
protected createContext ( Workspace $workspace, array $dimensionValues, array $contextProperties = [] ) : Context
$workspace Neos\ContentRepository\Domain\Model\Workspace Workspace for the new context
$dimensionValues array The dimension values for the new context
$contextProperties array Additional pre-defined context properties
Результат Context

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

TODO: This method needs to be optimized / implemented in collaboration with a DQL-based method in NodeDataRepository
public discardAllNodes ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace The workspace to flush, can't be the live workspace
Результат void

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

If the node has been moved, this method will also discard all changes of child nodes of the given node.
public discardNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to discard
Результат void

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

Discards the given nodes.
public discardNodes ( array $nodes ) : void
$nodes array
Результат void

doDiscardNode() защищенный Метод

Method which does the actual work of discarding, includes a protection against endless recursions and multiple discarding of the same node.
protected doDiscardNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, array &$alreadyDiscardedNodeIdentifiers = [] ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to discard
$alreadyDiscardedNodeIdentifiers array
Результат void

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

The signal emits the node that has been discarded.
public emitNodeDiscarded ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

The signal emits the source node and target workspace, i.e. the node contains its source workspace.
public emitNodePublished ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace = null ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$targetWorkspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Returns a list of nodes contained in the given workspace which are not yet published
public getUnpublishedNodes ( Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>

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

Returns the number of unpublished nodes contained in the given workspace
public getUnpublishedNodesCount ( Workspace $workspace ) : integer
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат integer

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

Publishes the given node to the specified target workspace. If no workspace is specified, the source workspace's base workspace is assumed.
public publishNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $targetWorkspace = null ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$targetWorkspace Neos\ContentRepository\Domain\Model\Workspace If not set the base workspace is assumed to be the publishing target
Результат void

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

Publishes the given nodes to the specified target workspace. If no workspace is specified, the source workspace's base workspace is assumed.
public publishNodes ( array $nodes, Workspace $targetWorkspace = null ) : void
$nodes array
$targetWorkspace Neos\ContentRepository\Domain\Model\Workspace If not set the base workspace is assumed to be the publishing target
Результат void

sortNodesForPublishing() защищенный Метод

Sort an unsorted list of nodes in a publishable order
protected sortNodesForPublishing ( array $nodes ) : array
$nodes array Unsorted list of nodes (unpublished nodes)
Результат array Sorted list of nodes for publishing

Описание свойств

$contentDimensionPresetSource защищенное свойство

protected ContentDimensionPresetSourceInterface,Neos\ContentRepository\Domain\Service $contentDimensionPresetSource
Результат Neos\ContentRepository\Domain\Service\ContentDimensionPresetSourceInterface

$contextFactory защищенное свойство

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Результат Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$nodeDataRepository защищенное свойство

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Результат Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory защищенное свойство

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Результат Neos\ContentRepository\Domain\Factory\NodeFactory

$workspaceRepository защищенное свойство

protected WorkspaceRepository,Neos\ContentRepository\Domain\Repository $workspaceRepository
Результат Neos\ContentRepository\Domain\Repository\WorkspaceRepository