PHP 클래스 Neos\ContentRepository\Command\NodeCommandControllerPlugin

상속: implements Neos\ContentRepository\Command\NodeCommandControllerPluginInterface
파일 보기 프로젝트 열기: neos/neos-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

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