class WorkspaceCommandController extends CommandController (View source)

The Workspace Command Controller

Properties

protected UserService $userService
protected $persistenceManager
protected $contentRepositoryRegistry

Methods

void
publishCommand(string $workspace, string $contentRepositoryIdentifier = 'default', bool $verbose = false, bool $dryRun = false)

Publish changes of a workspace

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

Discard changes in workspace

void
createRootCommand(string $name, string $contentRepositoryIdentifier = 'default')

No description

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

Create a new workspace

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

Deletes a workspace

void
rebaseCommand(string $workspace, string $baseWorkspace, string $contentRepositoryIdentifier = 'default')

Rebase a workspace

void
listCommand(string $contentRepositoryIdentifier = 'default')

Display a list of existing workspaces

Details

void publishCommand(string $workspace, string $contentRepositoryIdentifier = 'default', 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 $contentRepositoryIdentifier
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

Exceptions

ExceptionInterface

void discardCommand(string $workspace, string $contentRepositoryIdentifier = 'default', 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"

string $contentRepositoryIdentifier
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 createRootCommand(string $name, string $contentRepositoryIdentifier = 'default')

No description

Parameters

string $name
string $contentRepositoryIdentifier

Return Value

void

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

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

string $contentRepositoryIdentifier

Return Value

void

void deleteCommand(string $workspace, bool $force = false, string $contentRepositoryIdentifier = '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.

Parameters

string $workspace

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

bool $force

Delete the workspace and all of its contents

string $contentRepositoryIdentifier

Return Value

void

See also

neos.neos:workspace:discard

void rebaseCommand(string $workspace, string $baseWorkspace, string $contentRepositoryIdentifier = 'default')

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

string $contentRepositoryIdentifier

Return Value

void

void listCommand(string $contentRepositoryIdentifier = 'default')

Display a list of existing workspaces

Parameters

string $contentRepositoryIdentifier

Return Value

void