public publishNodeAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $targetWorkspaceName = null ) : void | ||
$node | Neos\ContentRepository\Domain\Model\NodeInterface | |
$targetWorkspaceName | string | |
return | void |
public function publishNodeAction(NodeInterface $node, $targetWorkspaceName = null)
{
$targetWorkspace = $targetWorkspaceName !== null ? $this->workspaceRepository->findOneByName($targetWorkspaceName) : null;
$this->publishingService->publishNode($node, $targetWorkspace);
$this->throwStatus(204, 'Node published', '');
}