PHP Class Neos\Neos\Controller\Module\Management\WorkspacesController

Inheritance: extends Neos\Neos\Controller\Module\AbstractModuleController
Afficher le fichier Open project: neos/neos-development-collection

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Method Details

computeChangesCount() protected méthode

Computes the number of added, changed and removed nodes for the given workspace
protected computeChangesCount ( Workspace $selectedWorkspace ) : array
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace
Résultat array

computeSiteChanges() protected méthode

Builds an array of changes for sites in the given workspace
protected computeSiteChanges ( Workspace $selectedWorkspace ) : array
$selectedWorkspace Neos\ContentRepository\Domain\Model\Workspace
Résultat array

createAction() public méthode

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
Résultat void

deleteAction() public méthode

Delete a workspace
public deleteAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace A workspace to delete
Résultat void

discardNodeAction() public méthode

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() public méthode

Discards content of the whole workspace
public discardWorkspaceAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Résultat void

editAction() public méthode

Edit a workspace
public editAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Résultat void

getOriginalNode() protected méthode

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
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

getPropertyLabel() protected méthode

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
Résultat string

indexAction() public méthode

Display a list of unpublished content
public indexAction ( ) : void
Résultat void

initializeAction() protected méthode

protected initializeAction ( ) : void
Résultat void

initializeUpdateAction() protected méthode

protected initializeUpdateAction ( ) : void
Résultat void

newAction() public méthode

public newAction ( ) : void
Résultat void

postProcessDiffArray() protected méthode

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
Résultat void

prepareBaseWorkspaceOptions() protected méthode

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
Résultat array

prepareOwnerOptions() protected méthode

Creates an array of user names and their respective labels which are possible owners for a workspace.
protected prepareOwnerOptions ( ) : array
Résultat array

publishNodeAction() public méthode

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() public méthode

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() public méthode

Publishes the whole workspace
public publishWorkspaceAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Résultat void

rebaseAndRedirectAction() public méthode

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
Résultat void

renderContentChanges() protected méthode

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
Résultat array

renderSlimmedDownContent() protected méthode

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
Résultat string

showAction() public méthode

public showAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace
Résultat void

updateAction() public méthode

Update a workspace
public updateAction ( Workspace $workspace ) : void
$workspace Neos\ContentRepository\Domain\Model\Workspace A workspace to update
Résultat void

Property Details

$contentDimensionPresetSource protected_oe property

protected ContentDimensionPresetSourceInterface,Neos\Neos\Domain\Service $contentDimensionPresetSource
Résultat Neos\Neos\Domain\Service\ContentDimensionPresetSourceInterface

$contextFactory protected_oe property

protected ContentContextFactory,Neos\Neos\Domain\Service $contextFactory
Résultat Neos\Neos\Domain\Service\ContentContextFactory

$propertyMapper protected_oe property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Résultat Neos\Flow\Property\PropertyMapper

$propertyMappingConfigurationBuilder protected_oe property

protected PropertyMappingConfigurationBuilder,Neos\Flow\Property $propertyMappingConfigurationBuilder
Résultat Neos\Flow\Property\PropertyMappingConfigurationBuilder

$publishingService protected_oe property

protected PublishingService,Neos\Neos\Service $publishingService
Résultat Neos\Neos\Service\PublishingService

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
Résultat Neos\Flow\Security\Context

$siteRepository protected_oe property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
Résultat Neos\Neos\Domain\Repository\SiteRepository

$translator protected_oe property

protected Translator,Neos\Flow\I18n $translator
Résultat Neos\Flow\I18n\Translator

$userService protected_oe property

protected UserService,Neos\Neos\Domain\Service $userService
Résultat Neos\Neos\Domain\Service\UserService

$workspaceRepository protected_oe property

protected WorkspaceRepository,Neos\ContentRepository\Domain\Repository $workspaceRepository
Résultat Neos\ContentRepository\Domain\Repository\WorkspaceRepository