WorkspaceCommandController
class WorkspaceCommandController extends CommandController (View source)
The Workspace Command Controller
Properties
| protected UserService | $userService | ||
| protected ContentRepositoryRegistry | $contentRepositoryRegistry | ||
| protected WorkspacePublishingService | $workspacePublishingService | ||
| protected WorkspaceService | $workspaceService |
Methods
Publish changes of a workspace
Discard changes in workspace
Rebase workspace on base workspace
Create a new root workspace for a content repository
Create a new personal workspace for the specified user
Create a new shared workspace
Set/change the title of a workspace
Set/change the description of a workspace
Assign a workspace role to the given user/user group
Unassign a workspace role from the given user/user group
Deletes a workspace
Rebase all outdated content streams
Display a list of existing workspaces
Display details for the specified workspace
Details
void
publishCommand(string $workspace, string $contentRepository = 'default')
Publish changes of a workspace
This command publishes all modified, created or deleted nodes in the specified workspace to its base workspace.
void
discardCommand(string $workspace, string $contentRepository = 'default')
Discard changes in workspace
This command discards all modified, created or deleted nodes in the specified workspace.
void
rebaseCommand(string $workspace, string $contentRepository = 'default', bool $force = false)
Rebase workspace on base workspace
This command rebases the given workspace on its base workspace, it may fail if the rebase is not possible.
void
createRootCommand(string $name, string $contentRepository = 'default', string|null $title = null, string|null $description = null)
Create a new root workspace for a content repository
NOTE: By default, only administrators can access workspaces without role assignments. Use workspace:assignrole to add workspace permissions
void
createPersonalCommand(string $workspace, string $owner, string $baseWorkspace = 'live', string|null $title = null, string|null $description = null, string $contentRepository = 'default')
Create a new personal workspace for the specified user
void
createSharedCommand(string $workspace, string $baseWorkspace = 'live', string|null $title = null, string|null $description = null, string $contentRepository = 'default')
Create a new shared workspace
NOTE: By default, only administrators can access workspaces without role assignments. Use workspace:assignrole to add workspace permissions
void
setTitleCommand(string $workspace, string $newTitle, string $contentRepository = 'default')
Set/change the title of a workspace
void
setDescriptionCommand(string $workspace, string $newDescription, string $contentRepository = 'default')
Set/change the description of a workspace
void
assignRoleCommand(string $workspace, string $subject, string $role, string $contentRepository = 'default', string $type = 'group')
Assign a workspace role to the given user/user group
Without explicit workspace roles, only administrators can change the corresponding workspace. With this command, a user or group (represented by a Flow role identifier) can be granted one of the two roles:
- viewer: Can read from the workspace
- collaborator: Can read from and write to the workspace
- manager: Can read from and write to the workspace and manage it (i.e. change metadata & role assignments)
Examples:
To grant editors read and write access to a (shared) workspace: ./flow workspace:assignrole some-workspace "Neos.Neos:AbstractEditor" collaborator
To grant a specific user read, write and manage access to a workspace: ./flow workspace:assignrole some-workspace admin manager --type user
{\Neos\Neos\Domain\Model\WorkspaceRole}
void
unassignRoleCommand(string $workspace, string $subject, string $contentRepository = 'default', string $type = 'group')
Unassign a workspace role from the given user/user group
void
deleteCommand(string $workspace, bool $force = false, string $contentRepository = 'default')
Deletes a workspace
This command deletes a workspace. If you only want to empty a workspace and not delete the workspace itself, use workspace:discard instead.
void
rebaseOutdatedCommand(string $contentRepository = 'default', bool $force = false)
Rebase all outdated content streams
void
listCommand(string $contentRepository = 'default')
Display a list of existing workspaces
void
showCommand(string $workspace, string $contentRepository = 'default')
Display details for the specified workspace