[ENTITY][Note] Add getLanguageLocale() and getNoteLanguageShortDisplay()

[CARDS][Note] Render note's language short display

[PLUGINS] Bring back titles to Reply, Repeat and Favourite actions
This commit is contained in:
2021-12-02 15:05:23 +00:00
parent d044039272
commit 37ef8cddfa
6 changed files with 33 additions and 3 deletions

View File

@@ -217,6 +217,16 @@ class Note extends Entity
return Avatar::getAvatarUrl($this->getActorId(), $size);
}
public function getNoteLanguageShortDisplay(): string
{
return Language::getFromId($this->language_id)->getShortDisplay();
}
public function getLanguageLocale(): string
{
return Language::getFromId($this->language_id)->getLocale();
}
public static function getAllNotesByActor(Actor $actor): array
{
return DB::sql(