diff options
| author | winter | 2024-12-19 22:59:40 +0000 |
|---|---|---|
| committer | winter | 2024-12-19 22:59:40 +0000 |
| commit | df051a7524a93f96bfc69924c202a51286517ce2 (patch) | |
| tree | ae6818812367b642e5359291f04b47a6627c02e8 /Digitigrade/Model/FollowRelation.php | |
| parent | f6a55426cac40501aa7f8e88eb7bfd318d7cd170 (diff) | |
let notes push themselves to interested parties
Diffstat (limited to 'Digitigrade/Model/FollowRelation.php')
| -rw-r--r-- | Digitigrade/Model/FollowRelation.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Digitigrade/Model/FollowRelation.php b/Digitigrade/Model/FollowRelation.php index fc43a6f..0af9da5 100644 --- a/Digitigrade/Model/FollowRelation.php +++ b/Digitigrade/Model/FollowRelation.php @@ -34,4 +34,18 @@ class FollowRelation extends Model { public static function findByActors(Actor $subject, Actor $object): ?self { return self::findWhere('subject = ? and object = ?', [$subject->id, $object->id]); } + + /** + * @return self[] + */ + public static function findAllWithSubject(Actor $subject): array { + return self::findAllWhere('subject = ?', [$subject->id]); + } + + /** + * @return self[] + */ + public static function findAllWithObject(Actor $object): array { + return self::findAllWhere('object = ?', [$object->id]); + } }
\ No newline at end of file |
