private function activateFolderById($id, FolderInterface $folder)
    {
        foreach ($folder->getChildren() as $child) {
            if ($child->getId() == $id) {
                $child->setActive(true);
                return true;
            }
            if ($this->activateFolderById($id, $child)) {
                return true;
            }
        }
        return false;
    }
private function activateFolderById($id, FolderInterface $folder)
    {
        foreach ($folder->getChildren() as $child) {
            if ($child->getId() == $id) {
                $child->setActive(true);
                return true;
            }
            if ($this->activateFolderById($id, $child)) {
                return true;
            }
        }
        return false;
    }
private function activateFolderById ( $ id , FolderInterface $ folder ) { foreach ( $ folder -> getChildren ( ) as $ child ) { if ( $ child -> getId ( ) == $ id ) { $ child -> setActive ( true ) ; return true ; } if ( $ this -> activateFolderById ( $ id , $ child ) ) { return true ; } } return false ; }
Activate the folder by id.

@param int             $id
@param FolderInterface $folder

@return bool
Activate the folder by id .