Skip to content

Commit 5f681f9

Browse files
committed
SearchService.php: Enh. $languageFilter usage's doc
1 parent 6515cb2 commit 5f681f9

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/contracts/Repository/SearchService.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ interface SearchService
137137
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if query is not valid
138138
*
139139
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query
140-
* @param array<int, string>|array<string, mixed> $languageFilter Configuration for specifying prioritized languages query will be performed on.
140+
* @param array<string, mixed>|array<int, string> $languageFilter Configuration for specifying prioritized languages query will be performed on.
141141
* Also used to define which field languages are loaded for the returned content.
142-
* Currently, supports `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`.
143-
* `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
142+
* Currently, supports two syntaxes:
143+
* - `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`
144+
* - `[<language_code_string>,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
144145
* @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned.
145146
*
146147
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult
@@ -159,9 +160,10 @@ public function findContent(Query $query, array $languageFilter = [], bool $filt
159160
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if query is not valid
160161
*
161162
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Query $query
162-
* @param array<int, string>|array<string, mixed> $languageFilter Configuration for specifying prioritized languages query will be performed on.
163-
* Currently, supports `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`.
164-
* `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
163+
* @param array<string, mixed>|array<int, string> $languageFilter Configuration for specifying prioritized languages query will be performed on.
164+
* Currently, supports two syntaxes:
165+
* - `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`
166+
* - `[<language_code_string>,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
165167
* @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned.
166168
*
167169
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult
@@ -176,9 +178,10 @@ public function findContentInfo(Query $query, array $languageFilter = [], bool $
176178
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if there is more than than one result matching the criterions
177179
*
178180
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $filter
179-
* @param array<int, string>|array<string, mixed> $languageFilter Configuration for specifying prioritized languages query will be performed on.
180-
* Currently, supports `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`.
181-
* `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
181+
* @param array<string, mixed>|array<int, string> $languageFilter Configuration for specifying prioritized languages query will be performed on.
182+
* Currently, supports two syntaxes:
183+
* - `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`
184+
* - `[<language_code_string>,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
182185
* @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned.
183186
*
184187
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Content
@@ -201,10 +204,11 @@ public function suggest(string $prefix, array $fieldPaths = [], int $limit = 10,
201204
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if query is not valid
202205
*
203206
* @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery $query
204-
* @param array<int, string>|array<string, mixed> $languageFilter Configuration for specifying prioritized languages query will be performed on.
207+
* @param array<string, mixed>|array<int, string> $languageFilter Configuration for specifying prioritized languages query will be performed on.
205208
* Also used to define which field languages are loaded for the returned content.
206-
* Currently, supports `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`.
207-
* `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
209+
* Currently, supports two syntaxeses:
210+
* - `['languages' => [<language_code_string>,…], 'useAlwaysAvailable' => <bool>]`
211+
* - `[<language_code_string>,…]` where `useAlwaysAvailable` defaults to `true` to avoid exceptions on missing translations.
208212
* @param bool $filterOnUserPermissions if `true` (default), only the objects which the user is allowed to read are returned.
209213
*
210214
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult

0 commit comments

Comments
 (0)