Neos\Neos\Aspects\PluginUriAspect::generateUriForNode PHP Метод

generateUriForNode() публичный Метод

This method generates the Uri through the joinPoint with temporary overriding the used node
public generateUriForNode ( ActionRequest $request, Neos\Flow\Aop\JoinPointInterface $joinPoint, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string
$request Neos\Flow\Mvc\ActionRequest
$joinPoint Neos\Flow\Aop\JoinPointInterface The current join point
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат string $uri
    public function generateUriForNode(ActionRequest $request, JoinPointInterface $joinPoint, NodeInterface $node)
    {
        // store original node path to restore it after generating the uri
        $originalNodePath = $request->getMainRequest()->getArgument('node');
        // generate the uri for the given node
        $request->getMainRequest()->setArgument('node', $node->getContextPath());
        $result = $joinPoint->getAdviceChain()->proceed($joinPoint);
        // restore the original node path
        $request->getMainRequest()->setArgument('node', $originalNodePath);
        return $result;
    }