Neos.Neos/Classes/Command/NodeCommandControllerPlugin.php
protected function generateUriPathSegmentsForNode(NodeInterface $node, $dryRun)
    {
        if ((string)$node->getProperty('uriPathSegment') === '') {
            $name = $node->getLabel() ?: $node->getName();
            $uriPathSegment = $this->nodeUriPathSegmentGenerator->generateUriPathSegment($node);
            $taskDescription = sprintf('Add missing URI path segment for "<i>%s</i>" (<i>%s</i>) => <i>%s</i>', $node->getPath(), $name, $uriPathSegment);
            $taskClosure = function () use ($node, $uriPathSegment) {
                $node->setProperty('uriPathSegment', $uriPathSegment);
            };
            $this->dispatch(self::EVENT_TASK, $taskDescription, $taskClosure);
        }
        foreach ($node->getChildNodes('Neos.Neos:Document') as $childNode) {
            $this->generateUriPathSegmentsForNode($childNode, $dryRun);
        }
    }
protected function generateUriPathSegmentsForNode(NodeInterface $node, $dryRun)
    {
        if ((string)$node->getProperty('uriPathSegment') === '') {
            $name = $node->getLabel() ?: $node->getName();
            $uriPathSegment = $this->nodeUriPathSegmentGenerator->generateUriPathSegment($node);
            $taskDescription = sprintf('Add missing URI path segment for "<i>%s</i>" (<i>%s</i>) => <i>%s</i>', $node->getPath(), $name, $uriPathSegment);
            $taskClosure = function () use ($node, $uriPathSegment) {
                $node->setProperty('uriPathSegment', $uriPathSegment);
            };
            $this->dispatch(self::EVENT_TASK, $taskDescription, $taskClosure);
        }
        foreach ($node->getChildNodes('Neos.Neos:Document') as $childNode) {
            $this->generateUriPathSegmentsForNode($childNode, $dryRun);
        }
    }
protected function generateUriPathSegmentsForNode ( NodeInterface $ node , $ dryRun ) { if ( ( string ) $ node -> getProperty ( 'uriPathSegment' ) === '' ) { $ name = $ node -> getLabel ( ) ? : $ node -> getName ( ) ; $ uriPathSegment = $ this -> nodeUriPathSegmentGenerator -> generateUriPathSegment ( $ node ) ; $ taskDescription = sprintf ( 'Add missing URI path segment for "<i>%s</i>" (<i>%s</i>) => <i>%s</i>' , $ node -> getPath ( ) , $ name , $ uriPathSegment ) ; $ taskClosure = function ( ) use ( $ node , $ uriPathSegment ) { $ node -> setProperty ( 'uriPathSegment' , $ uriPathSegment ) ; } ; $ this -> dispatch ( self :: EVENT_TASK , $ taskDescription , $ taskClosure ) ; } foreach ( $ node -> getChildNodes ( 'Neos.Neos:Document' ) as $ childNode ) { $ this -> generateUriPathSegmentsForNode ( $ childNode , $ dryRun ) ; } }
Traverses through the tree starting at the given root node and sets the uriPathSegment property derived from
the node label.

@param NodeInterface $node The node where the traversal starts
@param boolean $dryRun
@return void
@throws NodeException
@throws NeosException
Traverses through the tree starting at the given root node and sets the uriPathSegment property derived from the node label .