Skip to content

Commit 624e551

Browse files
IsBookmarked criterion added
1 parent 3b01b78 commit 624e551

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
description: IsBookmarked Search Criterion
3+
---
4+
5+
# IsBookmarked Criterion
6+
7+
The [`IsBookmarked` Search Criterion](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-Location-IsBookmarked.html)
8+
searches for location based on whether it's bookmarked or not.
9+
10+
This Criterion is available only for location Search.
11+
It works with current user reference.
12+
13+
## Arguments
14+
15+
- `value` - bool representing whether to search for bookmarked location (default `true`) or not bookmarked location (`false`)
16+
17+
## Example
18+
19+
### PHP
20+
21+
``` php
22+
<?php declare(strict_types=1);
23+
24+
use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery;
25+
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Location\IsBookmarked;
26+
27+
$query = new LocationQuery();
28+
$query->filter = new IsBookmarked();
29+
30+
/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */
31+
32+
$results = $searchService->findLocations($query);
33+
```

docs/search/criteria_reference/search_criteria_reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Due to this storage limitation, searching content using the Country Field Type o
4242
|[ImageMimeType](imagemimetype_criterion.md)|Image type|&#10004;|&#10004;||
4343
|[ImageOrientation](imageorientation_criterion.md)|Image orientation|&#10004;|&#10004;||
4444
|[ImageWidth](imagewidth_criterion.md)|Image width in pixels|&#10004;|&#10004;||
45+
|[IsBookmarked](isbookmarked_criterion.md)|Whether a location is bookmarked or not| |&#10004; |&#10004; |
4546
|[IsCurrencyEnabledCriterion](iscurrencyenabled_criterion.md)|Whether a specified currency is enabled in the system| | | |
4647
|[IsFieldEmpty](isfieldempty_criterion.md)|Whether a specified Field of a content item is empty or not|&#10004; |&#10004; | |
4748
|[IsMainLocation](ismainlocation_criterion.md)|Whether a Location is the main Location of a content item| |&#10004; |&#10004; |

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ nav:
499499
- ImageMimeType: search/criteria_reference/imagemimetype_criterion.md
500500
- ImageOrientation: search/criteria_reference/imageorientation_criterion.md
501501
- ImageWidth: search/criteria_reference/imagewidth_criterion.md
502+
- IsBookmarked: search/criteria_reference/isbookmarked_criterion.md
502503
- IsCurrencyEnabled: search/criteria_reference/iscurrencyenabled_criterion.md
503504
- IsFieldEmpty: search/criteria_reference/isfieldempty_criterion.md
504505
- IsMainLocation: search/criteria_reference/ismainlocation_criterion.md

0 commit comments

Comments
 (0)