Neos.ContentRepository/Classes/Domain/Service/NodeService.php
public function createChildNodes(NodeInterface $node)
    {
        $nodeType = $node->getNodeType();
        foreach ($nodeType->getAutoCreatedChildNodes() as $childNodeName => $childNodeType) {
            try {
                $node->createNode($childNodeName, $childNodeType);
            } catch (NodeExistsException $exception) {
                // If you have a node that has been marked as removed, but is needed again
                // the old node is recovered
                $childNodePath = NodePaths::addNodePathSegment($node->getPath(), $childNodeName);
                $contextProperties = $node->getContext()->getProperties();
                $contextProperties['removedContentShown'] = true;
                $context = $this->contextFactory->create($contextProperties);
                $childNode = $context->getNode($childNodePath);
                if ($childNode->isRemoved()) {
                    $childNode->setRemoved(false);
                }
            }
        }
    }
public function createChildNodes(NodeInterface $node)
    {
        $nodeType = $node->getNodeType();
        foreach ($nodeType->getAutoCreatedChildNodes() as $childNodeName => $childNodeType) {
            try {
                $node->createNode($childNodeName, $childNodeType);
            } catch (NodeExistsException $exception) {
                // If you have a node that has been marked as removed, but is needed again
                // the old node is recovered
                $childNodePath = NodePaths::addNodePathSegment($node->getPath(), $childNodeName);
                $contextProperties = $node->getContext()->getProperties();
                $contextProperties['removedContentShown'] = true;
                $context = $this->contextFactory->create($contextProperties);
                $childNode = $context->getNode($childNodePath);
                if ($childNode->isRemoved()) {
                    $childNode->setRemoved(false);
                }
            }
        }
    }
public function createChildNodes ( NodeInterface $ node ) { $ nodeType = $ node -> getNodeType ( ) ; foreach ( $ nodeType -> getAutoCreatedChildNodes ( ) as $ childNodeName => $ childNodeType ) { try { $ node -> createNode ( $ childNodeName , $ childNodeType ) ; } catch ( NodeExistsException $ exception ) { // If you have a node that has been marked as removed, but is needed again // the old node is recovered $ childNodePath = NodePaths :: addNodePathSegment ( $ node -> getPath ( ) , $ childNodeName ) ; $ contextProperties = $ node -> getContext ( ) -> getProperties ( ) ; $ contextProperties [ 'removedContentShown' ] = true ; $ context = $ this -> contextFactory -> create ( $ contextProperties ) ; $ childNode = $ context -> getNode ( $ childNodePath ) ; if ( $ childNode -> isRemoved ( ) ) { $ childNode -> setRemoved ( false ) ; } } } }
Creates missing child nodes for the given node.

@param NodeInterface $node
@return void
Creates missing child nodes for the given node .