PHP Класс Neos\ContentRepository\Command\NodeCommandControllerPlugin

Наследование: implements Neos\ContentRepository\Command\NodeCommandControllerPluginInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$contentDimensionCombinator Neos\ContentRepository\Domain\Service\ContentDimensionCombinator
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$entityManager Doctrine\Common\Persistence\ObjectManager ..
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$output Neos\Flow\Cli\ConsoleOutput
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$pluginConfigurations array
$propertyMapper Neos\Flow\Property\PropertyMapper
$workspaceRepository Neos\ContentRepository\Domain\Repository\WorkspaceRepository

Открытые методы

Метод Описание
addMissingDefaultValues ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void Performs checks for unset properties that has default values and sets them if necessary.
addMissingDefaultValuesByNodeType ( NodeType $nodeType = null, string $workspaceName, boolean $dryRun ) : void Adds missing default values for the given node type
fixNodesWithInconsistentIdentifier ( string $workspaceName, boolean $dryRun ) : void Detect and fix nodes in non-live workspaces whose identifier does not match their corresponding node in the live workspace.
getSubCommandDescription ( string $controllerCommandName ) : string Returns a piece of description for the specific task the plugin solves for the specified command
getSubCommandShortDescription ( string $controllerCommandName ) : string Returns a short description
invokeSubCommand ( string $controllerCommandName, ConsoleOutput $output, NodeType $nodeType = null, string $workspaceName = 'live', boolean $dryRun = false, boolean $cleanup = true, string $skip = null, string $only = null ) : void A method which runs the task implemented by the plugin for the given command
removeBrokenEntityReferences ( string $workspaceName, boolean $dryRun ) : void Remove broken entity references
removeNodesWithInvalidDimensions ( string $workspaceName, boolean $dryRun ) : void Remove nodes with invalid dimension values
removeNodesWithInvalidWorkspace ( string $workspaceName, boolean $dryRun ) : void Remove nodes with invalid workspace
removeUndefinedProperties ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void Performs checks for orphan nodes removes them if found.

Защищенные методы

Метод Описание
askBeforeExecutingTask ( string $question, Closure $task ) : void
collectNodesWithInvalidDimensions ( string $workspaceName, array $allowedDimensionCombinations ) : array Collects all nodes of the given node type which have dimension values not fitting to the current dimension configuration.
collectNodesWithInvalidWorkspace ( ) : array Collects all nodes of the given node type which refer to an invalid workspace configuration.
createChildNodesByNodeType ( NodeType $nodeType, string $workspaceName, boolean $dryRun ) : void Create missing child nodes for the given node type
createContext ( string $workspaceName, array $dimensions ) : Context Creates a content context for given workspace
createMissingChildNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void Performs checks for missing child nodes according to the node's auto-create configuration and creates them if necessary.
fixShadowNodesInWorkspace ( Workspace $workspace, boolean $dryRun, NodeType $nodeType = null ) : array Collects all nodes with missing shadow nodes
getNodeDataByNodeTypeAndWorkspace ( string $nodeType, string $workspaceName ) : array Retrieves all NodeData objects of a certain node type inside a given workspace.
removeAbstractAndUndefinedNodes ( string $workspaceName, boolean $dryRun ) : void Performs checks for nodes with abstract or undefined node types and removes them if found.
removeDisallowedChildNodes ( string $workspaceName, boolean $dryRun ) : void Performs checks for disallowed child nodes according to the node's auto-create configuration and constraints and removes them if found.
removeNode ( string $nodeIdentifier, string $dimensionsHash ) Removes the specified node (exactly that one)
removeNodeAndChildNodesInWorkspaceByPath ( string $nodePath, string $workspaceName ) Removes all nodes with a specific path and their children in the given workspace.
removeOrphanNodes ( string $workspaceName, boolean $dryRun ) : void Performs checks for orphan nodes removes them if found.
reorderChildNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void Reorder child nodes according to the current position configuration of child nodes.
reorderChildNodesByNodeType ( string $workspaceName, boolean $dryRun, NodeType $nodeType ) : void Reorder child nodes for the given node type
repairShadowNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void Repair nodes whose shadow nodes are missing

Описание методов

addMissingDefaultValues() публичный Метод

Performs checks for unset properties that has default values and sets them if necessary.
public addMissingDefaultValues ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Name of the workspace to consider
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only for this node type, if specified
Результат void

addMissingDefaultValuesByNodeType() публичный Метод

Adds missing default values for the given node type
public addMissingDefaultValuesByNodeType ( NodeType $nodeType = null, string $workspaceName, boolean $dryRun ) : void
$nodeType Neos\ContentRepository\Domain\Model\NodeType
$workspaceName string
$dryRun boolean
Результат void

askBeforeExecutingTask() защищенный Метод

protected askBeforeExecutingTask ( string $question, Closure $task ) : void
$question string
$task Closure
Результат void

collectNodesWithInvalidDimensions() защищенный Метод

Collects all nodes of the given node type which have dimension values not fitting to the current dimension configuration.
protected collectNodesWithInvalidDimensions ( string $workspaceName, array $allowedDimensionCombinations ) : array
$workspaceName string
$allowedDimensionCombinations array
Результат array

collectNodesWithInvalidWorkspace() защищенный Метод

Note: due to the foreign key constraints in the database, there actually never should be any node with n.workspace of a non-existing workspace because if that workspace does not exist anymore, the value would turn NULL. But the query covers this nevertheless. Better safe than sorry.
protected collectNodesWithInvalidWorkspace ( ) : array
Результат array

createChildNodesByNodeType() защищенный Метод

Create missing child nodes for the given node type
protected createChildNodesByNodeType ( NodeType $nodeType, string $workspaceName, boolean $dryRun ) : void
$nodeType Neos\ContentRepository\Domain\Model\NodeType
$workspaceName string
$dryRun boolean
Результат void

createContext() защищенный Метод

Creates a content context for given workspace
protected createContext ( string $workspaceName, array $dimensions ) : Context
$workspaceName string
$dimensions array
Результат Neos\ContentRepository\Domain\Service\Context

createMissingChildNodes() защищенный Метод

Performs checks for missing child nodes according to the node's auto-create configuration and creates them if necessary.
protected createMissingChildNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Name of the workspace to consider
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only for this node type, if specified
Результат void

fixNodesWithInconsistentIdentifier() публичный Метод

Detect and fix nodes in non-live workspaces whose identifier does not match their corresponding node in the live workspace.
public fixNodesWithInconsistentIdentifier ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string This argument will be ignored
$dryRun boolean Simulate?
Результат void

fixShadowNodesInWorkspace() защищенный Метод

Collects all nodes with missing shadow nodes
protected fixShadowNodesInWorkspace ( Workspace $workspace, boolean $dryRun, NodeType $nodeType = null ) : array
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dryRun boolean
$nodeType Neos\ContentRepository\Domain\Model\NodeType
Результат array

getNodeDataByNodeTypeAndWorkspace() защищенный Метод

Shadow nodes are excluded, because they will be published when publishing the moved node.
protected getNodeDataByNodeTypeAndWorkspace ( string $nodeType, string $workspaceName ) : array
$nodeType string
$workspaceName string
Результат array

getSubCommandDescription() публичный статический Метод

Returns a piece of description for the specific task the plugin solves for the specified command
public static getSubCommandDescription ( string $controllerCommandName ) : string
$controllerCommandName string Name of the command in question, for example "repair"
Результат string A piece of text to be included in the overall description of the node:xy command

getSubCommandShortDescription() публичный статический Метод

Returns a short description
public static getSubCommandShortDescription ( string $controllerCommandName ) : string
$controllerCommandName string Name of the command in question, for example "repair"
Результат string A piece of text to be included in the overall description of the node:xy command

invokeSubCommand() публичный Метод

A method which runs the task implemented by the plugin for the given command
public invokeSubCommand ( string $controllerCommandName, ConsoleOutput $output, NodeType $nodeType = null, string $workspaceName = 'live', boolean $dryRun = false, boolean $cleanup = true, string $skip = null, string $only = null ) : void
$controllerCommandName string Name of the command in question, for example "repair"
$output Neos\Flow\Cli\ConsoleOutput An instance of ConsoleOutput which can be used for output or dialogues
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only handle this node type (if specified)
$workspaceName string Only handle this workspace (if specified)
$dryRun boolean If TRUE, don't do any changes, just simulate what you would do
$cleanup boolean If FALSE, cleanup tasks are skipped
$skip string Skip the given check or checks (comma separated)
$only string Only execute the given check or checks (comma separated)
Результат void

removeAbstractAndUndefinedNodes() защищенный Метод

Performs checks for nodes with abstract or undefined node types and removes them if found.
protected removeAbstractAndUndefinedNodes ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string
$dryRun boolean Simulate?
Результат void

removeBrokenEntityReferences() публичный Метод

This removes references from nodes to entities which don't exist anymore.
public removeBrokenEntityReferences ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string
$dryRun boolean
Результат void

removeDisallowedChildNodes() защищенный Метод

Performs checks for disallowed child nodes according to the node's auto-create configuration and constraints and removes them if found.
protected removeDisallowedChildNodes ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string
$dryRun boolean Simulate?
Результат void

removeNode() защищенный Метод

Removes the specified node (exactly that one)
protected removeNode ( string $nodeIdentifier, string $dimensionsHash )
$nodeIdentifier string
$dimensionsHash string

removeNodeAndChildNodesInWorkspaceByPath() защищенный Метод

Removes all nodes with a specific path and their children in the given workspace.
protected removeNodeAndChildNodesInWorkspaceByPath ( string $nodePath, string $workspaceName )
$nodePath string
$workspaceName string

removeNodesWithInvalidDimensions() публичный Метод

This removes nodes which have dimension values not fitting to the current dimension configuration
public removeNodesWithInvalidDimensions ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string Name of the workspace to consider
$dryRun boolean Simulate?
Результат void

removeNodesWithInvalidWorkspace() публичный Метод

This removes nodes which refer to a workspace which does not exist.
public removeNodesWithInvalidWorkspace ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string This argument will be ignored
$dryRun boolean Simulate?
Результат void

removeOrphanNodes() защищенный Метод

Performs checks for orphan nodes removes them if found.
protected removeOrphanNodes ( string $workspaceName, boolean $dryRun ) : void
$workspaceName string
$dryRun boolean Simulate?
Результат void

removeUndefinedProperties() публичный Метод

Performs checks for orphan nodes removes them if found.
public removeUndefinedProperties ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only for this node type, if specified
Результат void

reorderChildNodes() защищенный Метод

Reorder child nodes according to the current position configuration of child nodes.
protected reorderChildNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Name of the workspace to consider
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType Only for this node type, if specified
Результат void

reorderChildNodesByNodeType() защищенный Метод

Reorder child nodes for the given node type
protected reorderChildNodesByNodeType ( string $workspaceName, boolean $dryRun, NodeType $nodeType ) : void
$workspaceName string
$dryRun boolean
$nodeType Neos\ContentRepository\Domain\Model\NodeType
Результат void

repairShadowNodes() защищенный Метод

This check searches for nodes which have a corresponding node in one of the base workspaces, have different node paths, but don't have a corresponding shadow node with a "movedto" value.
protected repairShadowNodes ( string $workspaceName, boolean $dryRun, NodeType $nodeType = null ) : void
$workspaceName string Currently ignored
$dryRun boolean Simulate?
$nodeType Neos\ContentRepository\Domain\Model\NodeType This argument will be ignored
Результат void

Описание свойств

$contentDimensionCombinator защищенное свойство

protected ContentDimensionCombinator,Neos\ContentRepository\Domain\Service $contentDimensionCombinator
Результат Neos\ContentRepository\Domain\Service\ContentDimensionCombinator

$contextFactory защищенное свойство

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Результат Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$entityManager защищенное свойство

..
protected ObjectManager,Doctrine\Common\Persistence $entityManager
Результат Doctrine\Common\Persistence\ObjectManager

$nodeDataRepository защищенное свойство

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Результат Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory защищенное свойство

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Результат Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeTypeManager защищенное свойство

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Результат Neos\ContentRepository\Domain\Service\NodeTypeManager

$output защищенное свойство

protected ConsoleOutput,Neos\Flow\Cli $output
Результат Neos\Flow\Cli\ConsoleOutput

$persistenceManager защищенное свойство

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

$pluginConfigurations защищенное свойство

protected array $pluginConfigurations
Результат array

$propertyMapper защищенное свойство

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper

$workspaceRepository защищенное свойство

protected WorkspaceRepository,Neos\ContentRepository\Domain\Repository $workspaceRepository
Результат Neos\ContentRepository\Domain\Repository\WorkspaceRepository