Neos.Neos/Classes/Routing/FrontendNodeRoutePartHandler.php
protected function getRequestPathByNode(NodeInterface $node)
    {
        if ($node->getParentPath() === SiteService::SITES_ROOT_PATH) {
            return '';
        }

        // To allow building of paths to non-hidden nodes beneath hidden nodes, we assume
        // the input node is allowed to be seen and we must generate the full path here.
        // To disallow showing a node actually hidden itself has to be ensured in matching
        // a request path, not in building one.
        $contextProperties = $node->getContext()->getProperties();
        $contextAllowingHiddenNodes = $this->contextFactory->create(array_merge($contextProperties, ['invisibleContentShown' => true]));
        $currentNode = $contextAllowingHiddenNodes->getNodeByIdentifier($node->getIdentifier());

        $requestPathSegments = [];
        while ($currentNode instanceof NodeInterface && $currentNode->getParentPath() !== SiteService::SITES_ROOT_PATH) {
            if (!$currentNode->hasProperty('uriPathSegment')) {
                throw new Exception\MissingNodePropertyException(sprintf('Missing "uriPathSegment" property for node "%s". Nodes can be migrated with the "flow node:repair" command.', $node->getPath()), 1415020326);
            }

            $pathSegment = $currentNode->getProperty('uriPathSegment');
            $requestPathSegments[] = $pathSegment;
            $currentNode = $currentNode->getParent();
        }

        return implode('/', array_reverse($requestPathSegments));
    }
protected function getRequestPathByNode(NodeInterface $node)
    {
        if ($node->getParentPath() === SiteService::SITES_ROOT_PATH) {
            return '';
        }

        // To allow building of paths to non-hidden nodes beneath hidden nodes, we assume
        // the input node is allowed to be seen and we must generate the full path here.
        // To disallow showing a node actually hidden itself has to be ensured in matching
        // a request path, not in building one.
        $contextProperties = $node->getContext()->getProperties();
        $contextAllowingHiddenNodes = $this->contextFactory->create(array_merge($contextProperties, ['invisibleContentShown' => true]));
        $currentNode = $contextAllowingHiddenNodes->getNodeByIdentifier($node->getIdentifier());

        $requestPathSegments = [];
        while ($currentNode instanceof NodeInterface && $currentNode->getParentPath() !== SiteService::SITES_ROOT_PATH) {
            if (!$currentNode->hasProperty('uriPathSegment')) {
                throw new Exception\MissingNodePropertyException(sprintf('Missing "uriPathSegment" property for node "%s". Nodes can be migrated with the "flow node:repair" command.', $node->getPath()), 1415020326);
            }

            $pathSegment = $currentNode->getProperty('uriPathSegment');
            $requestPathSegments[] = $pathSegment;
            $currentNode = $currentNode->getParent();
        }

        return implode('/', array_reverse($requestPathSegments));
    }
protected function getRequestPathByNode ( NodeInterface $ node ) { if ( $ node -> getParentPath ( ) === SiteService :: SITES_ROOT_PATH ) { return '' ; } // To allow building of paths to non-hidden nodes beneath hidden nodes, we assume // the input node is allowed to be seen and we must generate the full path here. // To disallow showing a node actually hidden itself has to be ensured in matching // a request path, not in building one. $ contextProperties = $ node -> getContext ( ) -> getProperties ( ) ; $ contextAllowingHiddenNodes = $ this -> contextFactory -> create ( array_merge ( $ contextProperties , [ 'invisibleContentShown' => true ] ) ) ; $ currentNode = $ contextAllowingHiddenNodes -> getNodeByIdentifier ( $ node -> getIdentifier ( ) ) ; $ requestPathSegments = [ ] ; while ( $ currentNode instanceof NodeInterface && $ currentNode -> getParentPath ( ) !== SiteService :: SITES_ROOT_PATH ) { if ( ! $ currentNode -> hasProperty ( 'uriPathSegment' ) ) { throw new Exception \ MissingNodePropertyException ( sprintf ( 'Missing "uriPathSegment" property for node "%s". Nodes can be migrated with the "flow node:repair" command.' , $ node -> getPath ( ) ) , 1415020326 ) ; } $ pathSegment = $ currentNode -> getProperty ( 'uriPathSegment' ) ; $ requestPathSegments [ ] = $ pathSegment ; $ currentNode = $ currentNode -> getParent ( ) ; } return implode ( '/' , array_reverse ( $ requestPathSegments ) ) ; }
Renders a request path based on the "uriPathSegment" properties of the nodes leading to the given node.

@param NodeInterface $node The node where the generated path should lead to
@return string A relative request path
@throws Exception\MissingNodePropertyException if the given node doesn't have a "uriPathSegment" property set
Renders a request path based on the uriPathSegment properties of the nodes leading to the given node .