class WorkspaceCommandController extends CommandController (View source)

The Workspace Command Controller

Properties

protected PublishingService $publishingService
protected WorkspaceRepository $workspaceRepository
protected UserService $userService

Methods

void
publishCommand(string $workspace, string $targetWorkspace = null, bool $verbose = false, bool $dryRun = false)

Publish changes of a workspace

void
discardCommand(string $workspace, bool $verbose = false, bool $dryRun = false)

Discard changes in workspace

void
createCommand(string $workspace, string $baseWorkspace = 'live', string $title = null, string $description = null, string $owner = '')

Create a new workspace

void
deleteCommand(string $workspace, bool $force = false)

Deletes a workspace

void
rebaseCommand(string $workspace, string $baseWorkspace)

Rebase a workspace

void
listCommand()

Display a list of existing workspaces

Details

void publishCommand(string $workspace, string $targetWorkspace = null, bool $verbose = false, bool $dryRun = false)

Publish changes of a workspace

This command publishes all modified, created or deleted nodes in the specified workspace to its base workspace. If a target workspace is specified, the content is published to that workspace instead.

Parameters

string $workspace

Name of the workspace containing the changes to publish, for example "user-john"

string $targetWorkspace

If specified, the content will be published to this workspace instead of the base workspace

bool $verbose

If enabled, some information about individual nodes will be displayed

bool $dryRun

If set, only displays which nodes would be published, no real changes are committed

Return Value

void

void discardCommand(string $workspace, bool $verbose = false, bool $dryRun = false)

Discard changes in workspace

This command discards all modified, created or deleted nodes in the specified workspace.

Parameters

string $workspace

Name of the workspace, for example "user-john"

bool $verbose

If enabled, information about individual nodes will be displayed

bool $dryRun

If set, only displays which nodes would be discarded, no real changes are committed

Return Value

void

void createCommand(string $workspace, string $baseWorkspace = 'live', string $title = null, string $description = null, string $owner = '')

Create a new workspace

This command creates a new workspace.

Parameters

string $workspace

Name of the workspace, for example "christmas-campaign"

string $baseWorkspace

Name of the base workspace. If none is specified, "live" is assumed.

string $title

Human friendly title of the workspace, for example "Christmas Campaign"

string $description

A description explaining the purpose of the new workspace

string $owner

The identifier of a User to own the workspace

Return Value

void

void deleteCommand(string $workspace, bool $force = false)

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.

Parameters

string $workspace

Name of the workspace, for example "christmas-campaign"

bool $force

Delete the workspace and all of its contents

Return Value

void

See also

neos.neos:workspace:discard

void rebaseCommand(string $workspace, string $baseWorkspace)

Rebase a workspace

This command sets a new base workspace for the specified workspace. Note that doing so will put the possible changes contained in the workspace to be rebased into a different context and thus might lead to unintended results when being published.

Parameters

string $workspace

Name of the workspace to rebase, for example "user-john"

string $baseWorkspace

Name of the new base workspace

Return Value

void

void listCommand()

Display a list of existing workspaces

Return Value

void