// type check to ensure searchBySystemTag is available, it is not
// exposed in API yet
- if (!empty($systemTagIds)) {
+ if (!empty($systemTagIds) && method_exists($this->userFolder, 'searchBySystemTag')) {
$tags = $this->tagManager->getTagsByIds($systemTagIds, $this->userSession->getUser());
// For we run DB queries per tag and require intersection, we cannot apply limit and offset for DB queries on multi tag search.
$this->userFolder = $this->getMockBuilder(Folder::class)
->disableOriginalConstructor()
+ ->addMethods(['searchBySystemTag'])
+ ->onlyMethods(get_class_methods(Folder::class))
->getMock();
$this->previewManager = $this->getMockBuilder(IPreview::class)
return $this->__call(__FUNCTION__, func_get_args());
}
+ public function searchBySystemTag(string $tagName, string $userId, int $limit = 0, int $offset = 0): array {
+ return $this->__call(__FUNCTION__, func_get_args());
+ }
+
/**
* @inheritDoc
*/
* @throws TagNotFoundException if at least one given tag ids did no exist
* The message contains a json_encoded array of the ids that could not be found
*
- * @since 9.0.0, optional parameter $user added in 28.0.0
+ * @since 9.0.0, optional parameter $user added in 26.0.4
*/
public function getTagsByIds($tagIds, ?IUser $user = null): array;