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

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

public rewritePluginViewUris ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : string
$joinPoint Neos\Flow\Aop\JoinPointInterface The current join point
Результат string The result of the target method if it has not been intercepted
    public function rewritePluginViewUris(JoinPointInterface $joinPoint)
    {
        /** @var ActionRequest $request */
        $request = $joinPoint->getProxy()->getRequest();
        $arguments = $joinPoint->getMethodArguments();
        $currentNode = $request->getInternalArgument('__node');
        if (!$request->getMainRequest()->hasArgument('node') || !$currentNode instanceof Node) {
            return $joinPoint->getAdviceChain()->proceed($joinPoint);
        }
        $currentNode = $request->getInternalArgument('__node');
        $controllerObjectName = $this->getControllerObjectName($request, $arguments);
        $actionName = $arguments['actionName'] !== null ? $arguments['actionName'] : $request->getControllerActionName();
        $targetNode = $this->pluginService->getPluginNodeByAction($currentNode, $controllerObjectName, $actionName);
        // TODO override namespace
        $q = new FlowQuery(array($targetNode));
        $pageNode = $q->closest('[instanceof Neos.Neos:Document]')->get(0);
        $result = $this->generateUriForNode($request, $joinPoint, $pageNode);
        return $result;
    }