Add projects index page, and more detail on placeholder pages

This commit is contained in:
Alex Cabal 2024-12-14 21:08:45 -06:00
parent fe5bb8ed48
commit c7a4e34e31
15 changed files with 211 additions and 59 deletions

View file

@ -1028,6 +1028,17 @@ class Ebook{
return $ebook;
}
/**
* @throws Exceptions\EbookNotFoundException If the `Ebook` can't be found.
*/
public static function Get(?int $ebookId): Ebook{
if($ebookId === null){
throw new Exceptions\EbookNotFoundException();
}
return Db::Query('SELECT * from Ebooks where EbookId = ?', [$ebookId], Ebook::class)[0] ?? throw new Exceptions\EbookNotFoundException();
}
/**
* Joins the `Name` properites of `Contributor` objects as a URL slug, e.g.,
*