ISearch
in
Interface ISearch
Tags
Attributes
- #[Consumable]
- $since: '13.0.0'
Table of Contents
Methods
- filteredSearch() : array{array, bool}
- Search for autocompletion entries.
- registerPlugin() : void
- search() : array{array, bool}
- Search for autocompletion entries.
Methods
filteredSearch()
Search for autocompletion entries.
public
filteredSearch(string $search, array<int, IShare::TYPE_*> $shareTypes, bool $lookup, string|null $itemType, string|null $itemId, int $limit, int $offset) : array{array, bool}
This takes care of filtering the returned users depending on the current user's permissions.
Parameters
- $search : string
- $shareTypes : array<int, IShare::TYPE_*>
- $lookup : bool
- $itemType : string|null
-
main identifier of the search to add some additional context (e.g. 'call', 'calendar')
- $itemId : string|null
-
sub-identifier of the search
- $limit : int
- $offset : int
Tags
Return values
array{array, bool} —with two elements, 1st ISearchResult as array, 2nd a bool indicating whether more result are available
registerPlugin()
public
registerPlugin(ISearchPlugin>} $pluginInfo) : void
Parameters
- $pluginInfo : ISearchPlugin>}
-
with keys 'shareType' containing the name of a corresponding constant in \OCP\IShare and 'class' with the class name of the plugin
Tags
search()
Search for autocompletion entries.
public
search(string $search, array<string|int, mixed> $shareTypes, bool $lookup, int $limit, int $offset) : array{array, bool}
Use filteredSearch instead.
After calling this function, users must emit the AutoCompleteFilter event to allow external apps to filter the results.
Parameters
- $search : string
- $shareTypes : array<string|int, mixed>
- $lookup : bool
- $limit : int
- $offset : int
Tags
Return values
array{array, bool} —with two elements, 1st ISearchResult as array, 2nd a bool indicating whether more result are available