concrete/src/Tree/Node/Node.php
public function selectChildrenNodesByID($nodeID, $loadMissingChildren = false)
    {
        if ($this->getTreeNodeID() == $nodeID) {
            $this->treeNodeIsSelected = true;
        } else {
            foreach ($this->getChildNodes() as $childnode) {
                if ($loadMissingChildren && !$childnode->getChildNodesLoaded()) {
                    $childnode->populateDirectChildrenOnly();
                }

                $childnode->selectChildrenNodesByID($nodeID, $loadMissingChildren);
            }
        }
    }
public function selectChildrenNodesByID($nodeID, $loadMissingChildren = false)
    {
        if ($this->getTreeNodeID() == $nodeID) {
            $this->treeNodeIsSelected = true;
        } else {
            foreach ($this->getChildNodes() as $childnode) {
                if ($loadMissingChildren && !$childnode->getChildNodesLoaded()) {
                    $childnode->populateDirectChildrenOnly();
                }

                $childnode->selectChildrenNodesByID($nodeID, $loadMissingChildren);
            }
        }
    }
public function selectChildrenNodesByID ( $ nodeID , $ loadMissingChildren = false ) { if ( $ this -> getTreeNodeID ( ) == $ nodeID ) { $ this -> treeNodeIsSelected = true ; } else { foreach ( $ this -> getChildNodes ( ) as $ childnode ) { if ( $ loadMissingChildren && ! $ childnode -> getChildNodesLoaded ( ) ) { $ childnode -> populateDirectChildrenOnly ( ) ; } $ childnode -> selectChildrenNodesByID ( $ nodeID , $ loadMissingChildren ) ; } } }
Recursively searches for a children node and marks it as selected.

@param int $nodeID ID of the children to be selected
@param bool $loadMissingChildren if set to true, it will fetch, as needed, the children of the current node, that have not been loaded yet
Recursively searches for a children node and marks it as selected .