PHP Класс Neos\Neos\Controller\Module\Management\WorkspacesController

Наследование: extends Neos\Neos\Controller\Module\AbstractModuleController
Показать файл Открыть проект

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

Свойство Тип Описание
$contentDimensionPresetSource Neos\Neos\Domain\Service\ContentDimensionPresetSourceInterface
$contextFactory Neos\Neos\Domain\Service\ContentContextFactory
$propertyMapper Neos\Flow\Property\PropertyMapper
$propertyMappingConfigurationBuilder Neos\Flow\Property\PropertyMappingConfigurationBuilder
$publishingService Neos\Neos\Service\PublishingService
$securityContext Neos\Flow\Security\Context
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$translator Neos\Flow\I18n\Translator
$userService Neos\Neos\Domain\Service\UserService
$workspaceRepository Neos\ContentRepository\Domain\Repository\WorkspaceRepository

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

Метод Описание
createAction ( string $title, Workspace $baseWorkspace, string $visibility, string $description = '' ) : void Create a workspace
deleteAction ( Workspace $workspace ) : void Delete a workspace
discardNodeAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $selectedWorkspace ) Discard a a single node
discardWorkspaceAction ( Workspace $workspace ) : void Discards content of the whole workspace
editAction ( Workspace $workspace ) : void Edit a workspace
indexAction ( ) : void Display a list of unpublished content
newAction ( ) : void
publishNodeAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $selectedWorkspace ) Publish a single node
publishOrDiscardNodesAction ( array $nodes, string $action, Workspace $selectedWorkspace = null ) Publishes or discards the given nodes
publishWorkspaceAction ( Workspace $workspace ) : void Publishes the whole workspace
rebaseAndRedirectAction ( Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, Workspace $targetWorkspace ) : void Rebase the current users personal workspace onto the given $targetWorkspace and then redirects to the $targetNode in the content module.
showAction ( Workspace $workspace ) : void
updateAction ( Workspace $workspace ) : void Update a workspace

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

Метод Описание
computeChangesCount ( Workspace $selectedWorkspace ) : array Computes the number of added, changed and removed nodes for the given workspace
computeSiteChanges ( Workspace $selectedWorkspace ) : array Builds an array of changes for sites in the given workspace
getOriginalNode ( Neos\ContentRepository\Domain\Model\NodeInterface $modifiedNode ) : Neos\ContentRepository\Domain\Model\NodeInterface Retrieves the given node's corresponding node in the base workspace (that is, which would be overwritten if the given node would be published)
getPropertyLabel ( string $propertyName, Neos\ContentRepository\Domain\Model\NodeInterface $changedNode ) : string Tries to determine a label for the specified property
initializeAction ( ) : void
initializeUpdateAction ( ) : void
postProcessDiffArray ( array &$diffArray ) : void A workaround for some missing functionality in the Diff Renderer:
prepareBaseWorkspaceOptions ( Workspace $excludedWorkspace = null ) : array Creates an array of workspace names and their respective titles which are possible base workspaces for other workspaces.
prepareOwnerOptions ( ) : array Creates an array of user names and their respective labels which are possible owners for a workspace.
renderContentChanges ( Neos\ContentRepository\Domain\Model\NodeInterface $changedNode ) : array Renders the difference between the original and the changed content of the given node and returns it, along with meta information, in an array.
renderSlimmedDownContent ( mixed $propertyValue ) : string Renders a slimmed down representation of a property of the given node. The output will be HTML, but does not contain any markup from the original content.

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

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

Computes the number of added, changed and removed nodes for the given workspace
protected computeChangesCount ( Workspace $selectedWorkspace ) : array
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace
Результат array

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

Builds an array of changes for sites in the given workspace
protected computeSiteChanges ( Workspace $selectedWorkspace ) : array
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace
Результат array

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

Create a workspace
public createAction ( string $title, Workspace $baseWorkspace, string $visibility, string $description = '' ) : void
$title string Human friendly title of the workspace, for example "Christmas Campaign"
$baseWorkspace Neos\ContentRepository\Domain\Model\Workspace Workspace the new workspace should be based on
$visibility string Visibility of the new workspace, must be either "internal" or "shared"
$description string A description explaining the purpose of the new workspace
Результат void

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

Delete a workspace
public deleteAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace A workspace to delete
Результат void

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

Discard a a single node
public discardNodeAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $selectedWorkspace )
$node Neos\ContentRepository\Domain\Model\NodeInterface
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace

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

Discards content of the whole workspace
public discardWorkspaceAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Edit a workspace
public editAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Retrieves the given node's corresponding node in the base workspace (that is, which would be overwritten if the given node would be published)
protected getOriginalNode ( Neos\ContentRepository\Domain\Model\NodeInterface $modifiedNode ) : Neos\ContentRepository\Domain\Model\NodeInterface
$modifiedNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат Neos\ContentRepository\Domain\Model\NodeInterface

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

Tries to determine a label for the specified property
protected getPropertyLabel ( string $propertyName, Neos\ContentRepository\Domain\Model\NodeInterface $changedNode ) : string
$propertyName string
$changedNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат string

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

Display a list of unpublished content
public indexAction ( ) : void
Результат void

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

protected initializeAction ( ) : void
Результат void

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

protected initializeUpdateAction ( ) : void
Результат void

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

public newAction ( ) : void
Результат void

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

This method will check if content in the given diff array is either completely new or has been completely removed and wraps the respective part in or tags, because the Diff Renderer currently does not do that in these cases.
protected postProcessDiffArray ( array &$diffArray ) : void
$diffArray array
Результат void

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

Creates an array of workspace names and their respective titles which are possible base workspaces for other workspaces.
protected prepareBaseWorkspaceOptions ( Workspace $excludedWorkspace = null ) : array
$excludedWorkspace Neos\ContentRepository\Domain\Model\Workspace If set, this workspace will be excluded from the list of returned workspaces
Результат array

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

Creates an array of user names and their respective labels which are possible owners for a workspace.
protected prepareOwnerOptions ( ) : array
Результат array

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

Publish a single node
public publishNodeAction ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Workspace $selectedWorkspace )
$node Neos\ContentRepository\Domain\Model\NodeInterface
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace

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

Publishes or discards the given nodes
public publishOrDiscardNodesAction ( array $nodes, string $action, Workspace $selectedWorkspace = null )
$nodes array <\Neos\ContentRepository\Domain\Model\NodeInterface> $nodes
$action string
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace

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

Publishes the whole workspace
public publishWorkspaceAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Rebase the current users personal workspace onto the given $targetWorkspace and then redirects to the $targetNode in the content module.
public rebaseAndRedirectAction ( Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, Workspace $targetWorkspace ) : void
$targetNode Neos\ContentRepository\Domain\Model\NodeInterface
$targetWorkspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Renders the difference between the original and the changed content of the given node and returns it, along with meta information, in an array.
protected renderContentChanges ( Neos\ContentRepository\Domain\Model\NodeInterface $changedNode ) : array
$changedNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат array

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

Note: It's clear that this method needs to be extracted and moved to a more universal service at some point. However, since we only implemented diff-view support for this particular controller at the moment, it stays here for the time being. Once we start displaying diffs elsewhere, we should refactor the diff rendering part.
protected renderSlimmedDownContent ( mixed $propertyValue ) : string
$propertyValue mixed
Результат string

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

public showAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат void

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

Update a workspace
public updateAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace A workspace to update
Результат void

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

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

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

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

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

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

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper

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

protected PropertyMappingConfigurationBuilder,Neos\Flow\Property $propertyMappingConfigurationBuilder
Результат Neos\Flow\Property\PropertyMappingConfigurationBuilder

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

protected PublishingService,Neos\Neos\Service $publishingService
Результат Neos\Neos\Service\PublishingService

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

protected Context,Neos\Flow\Security $securityContext
Результат Neos\Flow\Security\Context

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

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
Результат Neos\Neos\Domain\Repository\SiteRepository

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

protected Translator,Neos\Flow\I18n $translator
Результат Neos\Flow\I18n\Translator

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

protected UserService,Neos\Neos\Domain\Service $userService
Результат Neos\Neos\Domain\Service\UserService

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

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