summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-02-24 23:06:14 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commitd63e999d9378d520093e3c6a985fee2a6ed5bf2e (patch)
treebd1a57a139671f0d95c04ac25da95ffc4a01700e /lib
parent1f0924fb57f431a751dd3836a6145d5a8955af8f (diff)
✨ ItemServiceV2: add findAllSharedWithUserWithFilters
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/ItemServiceV2.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Service/ItemServiceV2.php b/lib/Service/ItemServiceV2.php
index a32eef314..442fcc1ce 100644
--- a/lib/Service/ItemServiceV2.php
+++ b/lib/Service/ItemServiceV2.php
@@ -369,6 +369,31 @@ class ItemServiceV2 extends Service
return $this->mapper->findAllFolder($userId, $folderId, $limit, $offset, $hideRead, $oldestFirst, $search);
}
/**
+ * Returns all items shared with a user
+ *
+ * @param int|null $folderId the id of the folder
+ * @param int $limit how many items should be returned
+ * @param int $offset the offset
+ * @param boolean $hideRead if unread items should also be returned
+ * @param boolean $oldestFirst if it should be ordered by oldest first
+ * @param string $userId the name of the user
+ * @param string[] $search an array of keywords that the result should
+ * contain in either the author, title, link
+ * or body
+ *
+ * @return array of items
+ */
+ public function findAllSharedWithUserWithFilters(
+ string $userId,
+ int $limit,
+ int $offset,
+ bool $hideRead,
+ bool $oldestFirst,
+ array $search = []
+ ): array {
+ return $this->mapper->findAllSharedWithUser($userId, $limit, $offset, $hideRead, $oldestFirst, $search);
+ }
+ /**
* Returns all items
*
* @param int $type the type of the feed