mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Get list of tags from DB
This commit is contained in:
parent
b3a173aa91
commit
43416e76db
1 changed files with 9 additions and 4 deletions
|
@ -172,12 +172,17 @@ class Library{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<Tag>
|
* @return array<EbookTag>
|
||||||
* @throws Exceptions\AppException
|
|
||||||
*/
|
*/
|
||||||
public static function GetTags(): array{
|
public static function GetTags(): array{
|
||||||
/** @var array<Tag> */
|
$tags = Db::Query('
|
||||||
return self::GetFromApcu('tags');
|
SELECT distinct t.*
|
||||||
|
from Tags t
|
||||||
|
inner join EbookTags et using (TagId)
|
||||||
|
order by t.Name
|
||||||
|
', [], EbookTag::class);
|
||||||
|
|
||||||
|
return $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue