This method generates the Uri through the joinPoint with
temporary overriding the used node

@param ActionRequest $request
@param JoinPointInterface $joinPoint The current join point
@param NodeInterface $node
@return string $uri
548561
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;
    }
707969
public function logRenewId(JoinPointInterface $joinPoint)
    {
        $session = $joinPoint->getProxy();
        $oldId = $session->getId();
        $newId = $joinPoint->getAdviceChain()->proceed($joinPoint);
        if ($session->isStarted()) {
            $this->logger->info(sprintf('%s: Changed session id from %s to %s', $this->getClassName($joinPoint), $oldId, $newId), ['FLOW_LOG_ENVIRONMENT' => [
                'packageKey' => 'Neos.Flow',
                'className' => $joinPoint->getClassName(),
                'methodName' => $joinPoint->getMethodName()
            ]]);
        }
        return $newId;
    }
550933
public function apply($queryBuilder, JoinMap $joinMap): ?string
    {
        $alias = null;

        $executedAliases = $queryBuilder->getAllAliases();
        foreach ($joinMap->getJoinMap() as $path => $fields) {
            foreach ($fields as $fieldData) {
                $field         = $fieldData['field'];
                $hasSelect     = $fieldData['hasSelect'];
                $selectFields  = $fieldData['selectFields'];
                $joinType      = $fieldData['joinType'];
                $conditionType = $fieldData['conditionType'];
                $condition     = $fieldData['condition'];

                $pathAlias = str_replace('.', '_', $path);
                $alias     = $pathAlias . '_' . $field;
                $join      = $pathAlias . '.' . $field;

                if (in_array($alias, $executedAliases)) {
                    continue;
                }

                if ($hasSelect) {
                    if (!$selectFields) {
                        $queryBuilder->addSelect($alias);

                    } else {
                        $queryBuilder->addSelect(sprintf('PARTIAL %s.{%s}', $alias, implode(',', $selectFields)));
                    }
                }

                if ($joinType == JoinMap::JOIN_TYPE_LEFT) {
                    $queryBuilder->leftJoin($join, $alias, $conditionType, $condition);

                } elseif ($joinType == JoinMap::JOIN_TYPE_INNER) {
                    $queryBuilder->innerJoin($join, $alias, $conditionType, $condition);

                } else {
                    throw new \RuntimeException('Join type not defined or has wrong type.');
                }
            }
        }

        return $alias;
    }
892430
public function registerDisableContentCache(JoinPointInterface $joinPoint)
    {
        $enableContentCache = $joinPoint->getMethodArgument('enableContentCache');
        if ($enableContentCache !== true) {
            $this->logger->log('Varnish cache disabled due content cache being disabled (e.g. because an exception was handled)', LOG_DEBUG);
            $this->evaluatedUncached = true;
        }
    }
576069
public function __doRequest($request, $location, $action, $version, $oneWay = null)
    {
        $this->requestId = substr(str_replace(' ', '', microtime()), 2);

        $response = parent::__doRequest($request, $location, $action, $version, $oneWay);

        if (!empty($response)) {
            $xml = new \SimpleXMLElement($response);
            $nss = array_flip($xml->getDocNamespaces(true));
            $invalidNs = 'http://namespaces.soaplite.com/perl';

            if (isset($nss[$invalidNs]) && isset($nss['API'])) {
                $response = str_replace($nss[$invalidNs] . ':', $nss['API'] . ':', $response);
            }
        }

        return $response;
    }
622702
public function addCacheHash(JoinPointInterface $joinPoint)
    {
        $result = $joinPoint->getAdviceChain()->proceed($joinPoint);

        $packageKey = $joinPoint->getMethodArgument('packageKey');
        $relativePathAndFilename = $joinPoint->getMethodArgument('relativePathAndFilename');

        return $this->getModifiedResourceUri($result, $relativePathAndFilename, $packageKey);
    }
457954
protected function generatePath(TreeNodeInterface $node, $parameters)
    {
        if ($this->requestContext->getParameter('_preview') || isset($parameters['_preview'])) {
            return $this->generatePreviewPath($node, $parameters);
        }

        $pathGenerator = new PathGenerator();
        $path = $pathGenerator->generatePath($node, $parameters);

        if ($path === '') {
            return $path;
        }

        $path = $this->generatePathPrefix($path, $node, $parameters);
        $path = $this->generatePathSuffix($path, $node, $parameters);
        $path = $this->generateQuery($path, $node, $parameters);

        return $path;
    }
433448
protected function getUriInformation(NodeInterface $node, ControllerContext $controllerContext): array
    {
        $nodeInfo = [];
        if (!$node->getNodeType()->isOfType($this->documentNodeTypeRole)) {
            return $nodeInfo;
        }

        try {
            $nodeInfo['uri'] = $this->createRedirectToNode($controllerContext, $node);
        } catch (\Neos\Flow\Mvc\Routing\Exception\MissingActionNameException $exception) {
            // Unless there is a serious problem with routes there shouldn't be an exception ever.
            $nodeInfo['uri'] = '';
        }

        return $nodeInfo;
    }
1358327
public function destroyClientSessionsOnRenewId(JoinPointInterface $joinPoint) {
		$session = $joinPoint->getProxy();
		$this->singleSignOnSessionManager->destroyRegisteredSsoClientSessions($session);
	}
493944
public function addWorkspaceName(JoinPointInterface $joinPoint)
    {
        $tags = $joinPoint->getAdviceChain()->proceed($joinPoint);

        $values = $joinPoint->getMethodArgument('routeValues');

        if (isset($values['node']) && strpos($values['node'], '@') !== false) {
            // Build context explicitly without authorization checks because the security context isn't available yet
            // anyway and any Entity Privilege targeted on Workspace would fail at this point:
            $this->securityContext->withoutAuthorizationChecks(function () use ($values, &$tags) {
                $contextPathPieces = NodePaths::explodeContextPath($values['node']);
                $tags[] = $contextPathPieces['workspaceName'];
            });
        }
        return $tags;
    }
262462
public function create(NodeInterface $referenceNode, array $nodeData, $position)
    {
        if (!in_array($position, ['before', 'into', 'after'], true)) {
            throw new \InvalidArgumentException('The position should be one of the following: "before", "into", "after".', 1347133640);
        }
        $nodeType = $this->nodeTypeManager->getNodeType($nodeData['nodeType']);

        if ($nodeType->isOfType('Neos.Neos:Document') && !isset($nodeData['properties']['uriPathSegment']) && isset($nodeData['properties']['title'])) {
            $nodeData['properties']['uriPathSegment'] = $this->nodeUriPathSegmentGenerator->generateUriPathSegment($referenceNode, $nodeData['properties']['title']);
        }

        $proposedNodeName = isset($nodeData['nodeName']) ? $nodeData['nodeName'] : null;
        $nodeData['nodeName'] = $this->nodeService->generateUniqueNodeName($this->getDesignatedParentNode($referenceNode, $position)->getPath(), $proposedNodeName);

        if ($position === 'into') {
            $newNode = $referenceNode->createNode($nodeData['nodeName'], $nodeType);
        } else {
            $parentNode = $referenceNode->getParent();
            $newNode = $parentNode->createNode($nodeData['nodeName'], $nodeType);

            if ($position === 'before') {
                $newNode->moveBefore($referenceNode);
            } else {
                $newNode->moveAfter($referenceNode);
            }
        }

        if (isset($nodeData['properties']) && is_array($nodeData['properties'])) {
            foreach ($nodeData['properties'] as $propertyName => $propertyValue) {
                $newNode->setProperty($propertyName, $propertyValue);
            }
        }

        return $newNode;
    }
581263
public function select2Repository(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $page  = (int) $request->get('page');
        $query = $request->get('q', '');

        // Fetch one more row than we need, so we can know if more rows exist.
        $offset = $page * self::RESULTS_PER_PAGE;
        $limit  = self::RESULTS_PER_PAGE + 1;

        $results = $this->search_service
            ->searchRepositories([$tree], [$query], $offset, $limit)
            ->map(static function (Repository $repository): array {
                return [
                    'id'    => $repository->xref(),
                    'text'  => view('selects/repository', ['repository' => $repository]),
                    'title' => ' ',
                ];
            });

        return response([
            'results'    => $results->slice(0, self::RESULTS_PER_PAGE)->all(),
            'pagination' => [
                'more' => $results->count() > self::RESULTS_PER_PAGE,
            ],
        ]);
    }
399421
public static function url($endpoint = null, $suffix = '')
    {
        $base = Phramework::getSetting('base');

        if ($endpoint) {
            $suffix = $endpoint . '/' . $suffix;

            $suffix = str_replace('//', '/', $suffix);
        }
        return $base . $suffix;
    }
621953
public static function fullUrl($addSufFix = true, $joinParams = true)
    {
        $params = '';
        if ($joinParams) {
            $get = $_GET;
            unset($get[Config::get('var_pathinfo')]);
            $params = http_build_query($get);
            $params && $params = '?' . $params;
        }
        return Request::baseUrl() . '/' . implode('/', Route::getPathInfo()) . ($addSufFix ? Config::get('url_html_suffix') : '') . $params;
    }
900315
public function validateConstruct(JoinPoint $joinPoint)
    {
        $className = BeanFactory::getObjectClass($joinPoint->getTarget());

        $annotations = AnnotationManager::getClassAnnotations($className);
        $propertyAnnotations = AnnotationManager::getPropertiesAnnotations($className);

        foreach($propertyAnnotations as $propertyName => $tAnnotations)
        {
            foreach($tAnnotations as $annotation)
            {
                $annotation = clone $annotation;
                $annotation->name = $propertyName;
                $annotations[] = $annotation;
            }
        }

        if(isset($annotations[0]))
        {
            $data = [];
            foreach($joinPoint->getTarget() as $name => $value)
            {
                $data[$name] = $value;
            }

            $validator = new Validator($data, $annotations);
            if(!$validator->validate())
            {
                $rule = $validator->getFailRule();
                $exception = $rule->exception;
                throw new $exception(sprintf('%s:__construct() Parameter verification is incorrect: %s', $className, $validator->getMessage()), $rule->exCode);
            }
        }
        else
        {
            $data = null;
        }
    }
1147543
public function withNodeUri($uri)
    {
        $builder = new RiakNodeBuilder();
        $node    = $builder
            ->withProtocol(parse_url($uri, PHP_URL_SCHEME))
            ->withHost(parse_url($uri, PHP_URL_HOST))
            ->withPort(parse_url($uri, PHP_URL_PORT))
            ->withUser(parse_url($uri, PHP_URL_USER))
            ->withPass(parse_url($uri, PHP_URL_PASS))
            ->build();

        return $this->withNode($node);
    }
870203
public function setControllerContext(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint) {
		$this->controllerContext = $joinPoint->getMethodArgument('controllerContext');
	}