private function findFolderById($id)
    {
        $folder = $this->getFolderRepository()->find($id);
        if (null === $folder) {
            throw new NotFoundHttpException('Folder not found.');
        }
        return $folder;
    }
private function findFolderById($id)
    {
        $folder = $this->getFolderRepository()->find($id);
        if (null === $folder) {
            throw new NotFoundHttpException('Folder not found.');
        }
        return $folder;
    }
private function findFolderById ( $ id ) { $ folder = $ this -> getFolderRepository ( ) -> find ( $ id ) ; if ( null === $ folder ) { throw new NotFoundHttpException ( 'Folder not found.' ) ; } return $ folder ; }
Returns the folder by id.

@param integer $id

@return FolderInterface
Returns the folder by id .