class NodeCommandController extends CommandController implements DescriptionAwareCommandControllerInterface (View source)

Node command controller for the Neos.ContentRepository package

Properties

protected NodeTypeManager $nodeTypeManager
protected WorkspaceRepository $workspaceRepository
protected ObjectManagerInterface $objectManager
protected array $pluginConfigurations

Methods

void
repairCommand(string $nodeType = null, string $workspace = 'live', bool $dryRun = false, bool $cleanup = true, string $skip = null, string $only = null)

Repair inconsistent nodes

static string
processShortDescription(string $controllerCommandName, string $shortDescription, ObjectManagerInterface $objectManager)

Processes the given short description of the specified command.

static string
processDescription(string $controllerCommandName, string $description, ObjectManagerInterface $objectManager)

Processes the given description of the specified command.

static array
detectPlugins(ObjectManagerInterface $objectManager)

Detects plugins for this command controller

Details

void repairCommand(string $nodeType = null, string $workspace = 'live', bool $dryRun = false, bool $cleanup = true, string $skip = null, string $only = null)

Repair inconsistent nodes

This command analyzes and repairs the node tree structure and individual nodes based on the current node type configuration.

It is possible to execute only one or more specific checks by providing the --skip or --only option. See the full description of checks further below for possible check identifiers.

The following checks will be performed:

{pluginDescriptions} Examples:

./flow node:repair

./flow node:repair --node-type Acme.Com:Page

./flow node:repair --workspace user-robert --only removeOrphanNodes,removeNodesWithInvalidDimensions

./flow node:repair --skip removeUndefinedProperties

Parameters

string $nodeType

Node type name, if empty update all declared node types

string $workspace

Workspace name, default is 'live'

bool $dryRun

Don't do anything, but report actions

bool $cleanup

If false, cleanup tasks are skipped

string $skip

Skip the given check or checks (comma separated)

string $only

Only execute the given check or checks (comma separated)

Return Value

void

Exceptions

StopActionException

static string processShortDescription(string $controllerCommandName, string $shortDescription, ObjectManagerInterface $objectManager)

Processes the given short description of the specified command.

Parameters

string $controllerCommandName

Name of the command the description is referring to, for example "flush"

string $shortDescription

The short command description so far

ObjectManagerInterface $objectManager

The object manager, can be used to access further information necessary for rendering the description

Return Value

string

the possibly modified short command description

static string processDescription(string $controllerCommandName, string $description, ObjectManagerInterface $objectManager)

Processes the given description of the specified command.

Parameters

string $controllerCommandName

Name of the command the description is referring to, for example "flush"

string $description

The command description so far

ObjectManagerInterface $objectManager

The object manager, can be used to access further information necessary for rendering the description

Return Value

string

the possibly modified command description

static protected array detectPlugins(ObjectManagerInterface $objectManager)

Detects plugins for this command controller

Parameters

ObjectManagerInterface $objectManager

Return Value

array