diff options
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Comments/ICommentsManager.php | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 95f0d2ce300..b179b8a7464 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -128,6 +128,7 @@ interface ICommentsManager { * @param string $sortDirection direction of the comments (`asc` or `desc`) * @param int $limit optional, number of maximum comments to be returned. if * set to 0, all comments are returned. + * @param bool $includeLastKnown * @return IComment[] * @since 14.0.0 */ @@ -136,7 +137,8 @@ interface ICommentsManager { string $objectId, int $lastKnownCommentId, string $sortDirection = 'asc', - int $limit = 30 + int $limit = 30, + bool $includeLastKnown = false ): array; /** @@ -154,6 +156,20 @@ interface ICommentsManager { public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array; /** + * Search for comments on one or more objects with a given content + * + * @param string $search content to search for + * @param string $objectType Limit the search by object type + * @param array $objectIds Limit the search by object ids + * @param string $verb Limit the verb of the comment + * @param int $offset + * @param int $limit + * @return IComment[] + * @since 21.0.0 + */ + public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array; + + /** * @param $objectType string the object type, e.g. 'files' * @param $objectId string the id of the object * @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments @@ -165,6 +181,44 @@ interface ICommentsManager { public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = ''); /** + * @param string $objectType + * @param string $objectId + * @param int $lastRead + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int; + + /** + * @param string $objectType + * @param string $objectId + * @param \DateTime $beforeDate + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int; + + /** + * @param string $objectType + * @param string $objectId + * @param string $verb + * @param string $actorType + * @param string[] $actors + * @return \DateTime[] Map of "string actor" => "\DateTime most recent comment date" + * @psalm-return array<string, \DateTime> + * @since 21.0.0 + */ + public function getLastCommentDateByActor( + string $objectType, + string $objectId, + string $verb, + string $actorType, + array $actors + ): array; + + /** * Get the number of unread comments for all files in a folder * * @param int $folderId |