PHP Interface Neos\ContentRepository\Domain\Service\NodeServiceInterface

Show file Open project: neos/neos-development-collection Interface Usage Examples

Public Methods

Method Description
cleanUpAutoCreatedChildNodes ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeType $oldNodeType ) : void Removes all auto created child nodes that existed in the previous nodeType.
cleanUpProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Removes all properties not configured in the current Node Type.
createChildNodes ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Creates missing child nodes for the given node.
generateUniqueNodeName ( string $parentPath, string $idealNodeName = null ) : string Generates a possible node name, optionally based on a suggested "ideal" name.
isNodeOfType ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeType $nodeType ) : boolean
nodePathAvailableForNode ( string $nodePath, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean Checks if the given node path can be used for the given node.
nodePathExistsInAnyContext ( string $nodePath ) : boolean Checks if the given node path exists in any possible context already.
normalizePath ( string $path, string $referencePath = null ) : string Normalizes the given node path to a reference path and returns an absolute path.
setDefaultValues ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Sets default node property values on the given node.

Method Details

cleanUpAutoCreatedChildNodes() public method

Removes all auto created child nodes that existed in the previous nodeType.
public cleanUpAutoCreatedChildNodes ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeType $oldNodeType ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$oldNodeType Neos\ContentRepository\Domain\Model\NodeType
return void

cleanUpProperties() public method

Removes all properties not configured in the current Node Type.
public cleanUpProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void

createChildNodes() public method

Creates missing child nodes for the given node.
public createChildNodes ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void

generateUniqueNodeName() public method

Generates a possible node name, optionally based on a suggested "ideal" name.
public generateUniqueNodeName ( string $parentPath, string $idealNodeName = null ) : string
$parentPath string
$idealNodeName string Can be any string, doesn't need to be a valid node name.
return string valid node name that is possible as child of the given $parentNode

isNodeOfType() public method

public isNodeOfType ( Neos\ContentRepository\Domain\Model\NodeInterface $node, NodeType $nodeType ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeInterface
$nodeType Neos\ContentRepository\Domain\Model\NodeType
return boolean

nodePathAvailableForNode() public method

Checks if the given node path can be used for the given node.
public nodePathAvailableForNode ( string $nodePath, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : boolean
$nodePath string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return boolean

nodePathExistsInAnyContext() public method

Checks if the given node path exists in any possible context already.
public nodePathExistsInAnyContext ( string $nodePath ) : boolean
$nodePath string
return boolean

normalizePath() public method

Normalizes the given node path to a reference path and returns an absolute path.
public normalizePath ( string $path, string $referencePath = null ) : string
$path string The non-normalized path
$referencePath string a reference path in case the given path is relative.
return string The normalized absolute path

setDefaultValues() public method

Sets default node property values on the given node.
public setDefaultValues ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void