Neos\Neos\Service\Controller\NodeController::createNodeForTheTreeAction PHP Method

createNodeForTheTreeAction() public method

Creates a new node and returns tree structure
public createNodeForTheTreeAction ( Node $referenceNode, array $nodeData, string $position, string $nodeTypeFilter = '' ) : void
$referenceNode Neos\ContentRepository\Domain\Model\Node
$nodeData array
$position string where the node should be added, -1 is before, 0 is in, 1 is after
$nodeTypeFilter string
return void
    public function createNodeForTheTreeAction(Node $referenceNode, array $nodeData, $position, $nodeTypeFilter = '')
    {
        $newNode = $this->nodeOperations->create($referenceNode, $nodeData, $position);
        $this->view->assignNodeAndChildNodes($newNode, $nodeTypeFilter);
    }