Neos\Neos\Routing\FrontendNodeRoutePartHandler::getRequestPathByNode PHP Метод

getRequestPathByNode() защищенный Метод

Renders a request path based on the "uriPathSegment" properties of the nodes leading to the given node.
protected getRequestPathByNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface The node where the generated path should lead to
Результат string A relative request path
    protected function getRequestPathByNode(NodeInterface $node)
    {
        if ($node->getParentPath() === SiteService::SITES_ROOT_PATH) {
            return '';
        }
        $requestPathSegments = [];
        while ($node instanceof NodeInterface && $node->getParentPath() !== SiteService::SITES_ROOT_PATH) {
            if (!$node->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 = $node->getProperty('uriPathSegment');
            $requestPathSegments[] = $pathSegment;
            $node = $node->getParent();
        }
        return implode('/', array_reverse($requestPathSegments));
    }