PHP Class Neos\Neos\Service\NodeOperations

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

Protected Properties

Property Type Description
$nodeService Neos\ContentRepository\Domain\Service\NodeServiceInterface
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$nodeUriPathSegmentGenerator Neos\Neos\Utility\NodeUriPathSegmentGenerator

Public Methods

Method Description
copy ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position, string $nodeName = null ) : Neos\ContentRepository\Domain\Model\NodeInterface Copy $node before, into or after $targetNode
create ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, array $nodeData, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface Helper method for creating a new node.
move ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface Move $node before, into or after $targetNode

Protected Methods

Method Description
getDesignatedParentNode ( Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface

Method Details

copy() public method

Copy $node before, into or after $targetNode
public copy ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position, string $nodeName = null ) : Neos\ContentRepository\Domain\Model\NodeInterface
$node Neos\ContentRepository\Domain\Model\NodeInterface the node to be copied
$targetNode Neos\ContentRepository\Domain\Model\NodeInterface the target node to be copied "to", see $position
$position string where the node should be added in relation to $targetNode (allowed: before, into, after)
$nodeName string optional node name (if empty random node name will be generated)
return Neos\ContentRepository\Domain\Model\NodeInterface The copied node

create() public method

Helper method for creating a new node.
public create ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, array $nodeData, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeData array
$position string
return Neos\ContentRepository\Domain\Model\NodeInterface

getDesignatedParentNode() protected method

protected getDesignatedParentNode ( Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface
$targetNode Neos\ContentRepository\Domain\Model\NodeInterface
$position string
return Neos\ContentRepository\Domain\Model\NodeInterface

move() public method

Move $node before, into or after $targetNode
public move ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position ) : Neos\ContentRepository\Domain\Model\NodeInterface
$node Neos\ContentRepository\Domain\Model\NodeInterface
$targetNode Neos\ContentRepository\Domain\Model\NodeInterface
$position string where the node should be added (allowed: before, into, after)
return Neos\ContentRepository\Domain\Model\NodeInterface The same node given as first argument

Property Details

$nodeService protected property

protected NodeServiceInterface,Neos\ContentRepository\Domain\Service $nodeService
return Neos\ContentRepository\Domain\Service\NodeServiceInterface

$nodeTypeManager protected property

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
return Neos\ContentRepository\Domain\Service\NodeTypeManager

$nodeUriPathSegmentGenerator protected property

protected NodeUriPathSegmentGenerator,Neos\Neos\Utility $nodeUriPathSegmentGenerator
return Neos\Neos\Utility\NodeUriPathSegmentGenerator