[CONTROLLER][Actor] Provide template with all notes by actor
[ENTITY][Note] Add getAllNotesByActor [TWIG] Actor profile page now renders all notes by the actor
This commit is contained in:
@@ -217,6 +217,18 @@ class Note extends Entity
|
||||
return Avatar::getAvatarUrl($this->getActorId(), $size);
|
||||
}
|
||||
|
||||
public static function getAllNotesByActor(Actor $actor): array
|
||||
{
|
||||
return DB::sql(
|
||||
<<<'EOF'
|
||||
select {select} from note n
|
||||
where (n.actor_id & :actor_id) <> 0
|
||||
order by n.created DESC
|
||||
EOF,
|
||||
['actor_id' => $actor],
|
||||
);
|
||||
}
|
||||
|
||||
public static function getAllNotes(int $note_scope): array
|
||||
{
|
||||
return DB::sql(
|
||||
|
Reference in New Issue
Block a user