Neos.Neos/Classes/Routing/Aspects/RouteCacheAspect.php
public function addCurrentNodeIdentifier(JoinPointInterface $joinPoint)
    {
        $values = $joinPoint->getMethodArgument('values');
        if (!isset($values['node']) || strpos($values['node'], '@') === false) {
            return;
        }

        // 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 ($joinPoint, $values) {
            $contextPathPieces = NodePaths::explodeContextPath($values['node']);
            $context = $this->contextFactory->create([
                'workspaceName' => $contextPathPieces['workspaceName'],
                'dimensions' => $contextPathPieces['dimensions'],
                'invisibleContentShown' => true
            ]);

            /** @var NodeInterface $node */
            $node = $context->getNode($contextPathPieces['nodePath']);
            if (!$node instanceof NodeInterface) {
                return;
            }

            $values['node-identifier'] = $node->getIdentifier();

            $values['node-parent-identifier'] = [];
            while ($node = $node->getParent()) {
                $values['node-parent-identifier'][] = $node->getIdentifier();
            }
            $joinPoint->setMethodArgument('values', $values);
        });
    }
public function addCurrentNodeIdentifier(JoinPointInterface $joinPoint)
    {
        $values = $joinPoint->getMethodArgument('values');
        if (!isset($values['node']) || strpos($values['node'], '@') === false) {
            return;
        }

        // 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 ($joinPoint, $values) {
            $contextPathPieces = NodePaths::explodeContextPath($values['node']);
            $context = $this->contextFactory->create([
                'workspaceName' => $contextPathPieces['workspaceName'],
                'dimensions' => $contextPathPieces['dimensions'],
                'invisibleContentShown' => true
            ]);

            /** @var NodeInterface $node */
            $node = $context->getNode($contextPathPieces['nodePath']);
            if (!$node instanceof NodeInterface) {
                return;
            }

            $values['node-identifier'] = $node->getIdentifier();

            $values['node-parent-identifier'] = [];
            while ($node = $node->getParent()) {
                $values['node-parent-identifier'][] = $node->getIdentifier();
            }
            $joinPoint->setMethodArgument('values', $values);
        });
    }
public function addCurrentNodeIdentifier ( JoinPointInterface $ joinPoint ) { $ values = $ joinPoint -> getMethodArgument ( 'values' ) ; if ( ! isset ( $ values [ 'node' ] ) || strpos ( $ values [ 'node' ] , '@' ) === false ) { return ; } // 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 ( $ joinPoint , $ values ) { $ contextPathPieces = NodePaths :: explodeContextPath ( $ values [ 'node' ] ) ; $ context = $ this -> contextFactory -> create ( [ 'workspaceName' => $ contextPathPieces [ 'workspaceName' ] , 'dimensions' => $ contextPathPieces [ 'dimensions' ] , 'invisibleContentShown' => true ] ) ; /** @var NodeInterface $node */ $ node = $ context -> getNode ( $ contextPathPieces [ 'nodePath' ] ) ; if ( ! $ node instanceof NodeInterface ) { return ; } $ values [ 'node-identifier' ] = $ node -> getIdentifier ( ) ; $ values [ 'node-parent-identifier' ] = [ ] ; while ( $ node = $ node -> getParent ( ) ) { $ values [ 'node-parent-identifier' ] [ ] = $ node -> getIdentifier ( ) ; } $ joinPoint -> setMethodArgument ( 'values' , $ values ) ; } ) ; }
Add the current node and all parent identifiers to be used for cache entry tagging

@Flow\Before("method(Neos\Flow\Mvc\Routing\RouterCachingService->extractUuids())")
@param JoinPointInterface $joinPoint The current join point
@return void
Add the current node and all parent identifiers to be used for cache entry tagging