Neos.ContentRepository/Classes/Domain/Repository/NodeDataRepository.php
public function findOneByPath($path, Workspace $workspace, array $dimensions = null, $removedNodes = false)
    {
        if ($path === '/') {
            return $workspace->getRootNodeData();
        }

        $workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);
        $nodes = $this->findRawNodesByPath($path, $workspace, $dimensions);
        $dimensions = $dimensions === null ? [] : $dimensions;
        $foundNodes = $this->reduceNodeVariantsByWorkspacesAndDimensions($nodes, $workspaces, $dimensions);
        $foundNodes = $this->filterNodeDataByBestMatchInContext($foundNodes, $workspace, $dimensions, $removedNodes);

        if ($removedNodes === true) {
            $foundNodes = $this->onlyRemovedNodes($foundNodes);
        } elseif ($removedNodes === false) {
            $foundNodes = $this->withoutRemovedNodes($foundNodes);
        }

        if ($foundNodes !== []) {
            return reset($foundNodes);
        }

        return null;
    }
public function findOneByPath($path, Workspace $workspace, array $dimensions = null, $removedNodes = false)
    {
        if ($path === '/') {
            return $workspace->getRootNodeData();
        }

        $workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);
        $nodes = $this->findRawNodesByPath($path, $workspace, $dimensions);
        $dimensions = $dimensions === null ? [] : $dimensions;
        $foundNodes = $this->reduceNodeVariantsByWorkspacesAndDimensions($nodes, $workspaces, $dimensions);
        $foundNodes = $this->filterNodeDataByBestMatchInContext($foundNodes, $workspace, $dimensions, $removedNodes);

        if ($removedNodes === true) {
            $foundNodes = $this->onlyRemovedNodes($foundNodes);
        } elseif ($removedNodes === false) {
            $foundNodes = $this->withoutRemovedNodes($foundNodes);
        }

        if ($foundNodes !== []) {
            return reset($foundNodes);
        }

        return null;
    }
public function findOneByPath ( $ path , Workspace $ workspace , array $ dimensions = null , $ removedNodes = false ) { if ( $ path === '/' ) { return $ workspace -> getRootNodeData ( ) ; } $ workspaces = $ this -> collectWorkspaceAndAllBaseWorkspaces ( $ workspace ) ; $ nodes = $ this -> findRawNodesByPath ( $ path , $ workspace , $ dimensions ) ; $ dimensions = $ dimensions === null ? [ ] : $ dimensions ; $ foundNodes = $ this -> reduceNodeVariantsByWorkspacesAndDimensions ( $ nodes , $ workspaces , $ dimensions ) ; $ foundNodes = $ this -> filterNodeDataByBestMatchInContext ( $ foundNodes , $ workspace , $ dimensions , $ removedNodes ) ; if ( $ removedNodes === true ) { $ foundNodes = $ this -> onlyRemovedNodes ( $ foundNodes ) ; } elseif ( $ removedNodes === false ) { $ foundNodes = $ this -> withoutRemovedNodes ( $ foundNodes ) ; } if ( $ foundNodes !== [ ] ) { return reset ( $ foundNodes ) ; } return null ; }
Find a single node by exact path.

@param string $path Absolute path of the node
@param Workspace $workspace The containing workspace
@param array $dimensions An array of dimensions with array of ordered values to use for fallback matching
@param boolean|NULL $removedNodes Include removed nodes, NULL (all), false (no removed nodes) or true (only removed nodes)
@throws \InvalidArgumentException
@return NodeData The matching node if found, otherwise NULL
Find a single node by exact path .