final class CrCommandController extends CommandController (View source)

Set up a content repository

Initialisation

The command "./flow cr:setup" sets up the content repository like event store and subscription database tables. It is non-destructive.

Note that a reset is not implemented here but for the Neos CMS use-case provided via "./flow site:pruneAll"

Staus information

The status of the content repository e.g. if a setup is required or if all subscriptions are active and their position can be examined with "./flow cr:status"

See also {\Neos\ContentRepositoryRegistry\Command\ContentRepositoryMaintainer} for more information.

Properties

protected ContentRepositoryRegistry $contentRepositoryRegistry

Methods

void
setupCommand(string $contentRepository = 'default', bool $quiet = false)

Sets up and checks required dependencies for a Content Repository instance Like event store and projection database tables.

void
statusCommand(string $contentRepository = 'default', bool $verbose = false, bool $quiet = false)

Determine and output the status of the event store and all registered projections for a given Content Repository

Details

void setupCommand(string $contentRepository = 'default', bool $quiet = false)

Sets up and checks required dependencies for a Content Repository instance Like event store and projection database tables.

Note: This command is non-destructive, i.e. it can be executed without side effects even if all dependencies are up-to-date Therefore it makes sense to include this command into the Continuous Integration

To check if the content repository needs to be setup look into cr:status. That command will also display information what is about to be migrated.

Parameters

string $contentRepository

Identifier of the Content Repository to set up

bool $quiet

If set, no output is generated. This is useful if only the exit code (0 = all OK, 1 = errors or warnings) is of interest

Return Value

void

void statusCommand(string $contentRepository = 'default', bool $verbose = false, bool $quiet = false)

Determine and output the status of the event store and all registered projections for a given Content Repository

In verbose mode it will also display information what should and will be migrated when cr:setup is used.

Parameters

string $contentRepository

Identifier of the Content Repository to determine the status for

bool $verbose

If set, more details will be shown

bool $quiet

If set, no output is generated. This is useful if only the exit code (0 = all OK, 1 = errors or warnings) is of interest

Return Value

void