concrete/src/Tree/Tree.php
public function getNodeByDisplayPath($path)
    {
        $root = $this->getRootTreeNodeObject();

        if ($path == '/' || !$path) {
            return $root;
        }

        $computedPath = '';
        $tree = $this;
        $walk = function ($node, $computedPath) use (&$walk, &$tree, &$path) {
            $node->populateDirectChildrenOnly();

            if ($node->getTreeNodeID() != $tree->getRootTreeNodeID()) {
                $name = $node->getTreeNodeName();
                $computedPath .= '/' . $name;
            }

            if (strcasecmp($computedPath, $path) == 0) {
                return $node;
            } else {
                $children = $node->getChildNodes();
                foreach ($children as $child) {
                    $node = $walk($child, $computedPath);
                    if ($node !== null) {
                        return $node;
                    }
                }
            }

            return;
        };
        $node = $walk($root, $computedPath);

        return $node;
    }
public function getNodeByDisplayPath($path)
    {
        $root = $this->getRootTreeNodeObject();

        if ($path == '/' || !$path) {
            return $root;
        }

        $computedPath = '';
        $tree = $this;
        $walk = function ($node, $computedPath) use (&$walk, &$tree, &$path) {
            $node->populateDirectChildrenOnly();

            if ($node->getTreeNodeID() != $tree->getRootTreeNodeID()) {
                $name = $node->getTreeNodeName();
                $computedPath .= '/' . $name;
            }

            if (strcasecmp($computedPath, $path) == 0) {
                return $node;
            } else {
                $children = $node->getChildNodes();
                foreach ($children as $child) {
                    $node = $walk($child, $computedPath);
                    if ($node !== null) {
                        return $node;
                    }
                }
            }

            return;
        };
        $node = $walk($root, $computedPath);

        return $node;
    }
public function getNodeByDisplayPath ( $ path ) { $ root = $ this -> getRootTreeNodeObject ( ) ; if ( $ path == '/' || ! $ path ) { return $ root ; } $ computedPath = '' ; $ tree = $ this ; $ walk = function ( $ node , $ computedPath ) use ( & $ walk , & $ tree , & $ path ) { $ node -> populateDirectChildrenOnly ( ) ; if ( $ node -> getTreeNodeID ( ) != $ tree -> getRootTreeNodeID ( ) ) { $ name = $ node -> getTreeNodeName ( ) ; $ computedPath .= '/' . $ name ; } if ( strcasecmp ( $ computedPath , $ path ) == 0 ) { return $ node ; } else { $ children = $ node -> getChildNodes ( ) ; foreach ( $ children as $ child ) { $ node = $ walk ( $ child , $ computedPath ) ; if ( $ node !== null ) { return $ node ; } } } return ; } ; $ node = $ walk ( $ root , $ computedPath ) ; return $ node ; }
Iterates through the segments in the path, to return the node at the proper display. Mostly used for export
and import.

@param $path
Iterates through the segments in the path to return the node at the proper display . Mostly used for export and import .