Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions code_samples/search/location/isbookmarked_criterion.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php declare(strict_types=1);

use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Location\IsBookmarked;

$query = new LocationQuery();
$query->filter = new IsBookmarked();
/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */
$results = $searchService->findLocations($query);
23 changes: 23 additions & 0 deletions docs/search/criteria_reference/isbookmarked_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: IsBookmarked Search Criterion
---

# IsBookmarked Criterion

The [`IsBookmarked` Search Criterion](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-Location-IsBookmarked.html)
searches for location based on whether it's bookmarked or not.

This Criterion is available only for location Search.
It works with current user reference.

## Arguments

- `value` - bool representing whether to search for bookmarked location (default `true`) or not bookmarked location (`false`)

## Example

### PHP

``` php
[[= include_file('code_samples/search/location/isbookmarked_criterion.php') =]]
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Due to this storage limitation, searching content using the Country Field Type o
|[ImageMimeType](imagemimetype_criterion.md)|Image type|&#10004;|&#10004;||
|[ImageOrientation](imageorientation_criterion.md)|Image orientation|&#10004;|&#10004;||
|[ImageWidth](imagewidth_criterion.md)|Image width in pixels|&#10004;|&#10004;||
|[IsBookmarked](isbookmarked_criterion.md)|Whether a location is bookmarked or not| |&#10004; |&#10004; |
|[IsCurrencyEnabledCriterion](iscurrencyenabled_criterion.md)|Whether a specified currency is enabled in the system| | | |
|[IsFieldEmpty](isfieldempty_criterion.md)|Whether a specified Field of a content item is empty or not|&#10004; |&#10004; | |
|[IsMainLocation](ismainlocation_criterion.md)|Whether a Location is the main Location of a content item| |&#10004; |&#10004; |
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ nav:
- ImageMimeType: search/criteria_reference/imagemimetype_criterion.md
- ImageOrientation: search/criteria_reference/imageorientation_criterion.md
- ImageWidth: search/criteria_reference/imagewidth_criterion.md
- IsBookmarked: search/criteria_reference/isbookmarked_criterion.md
- IsCurrencyEnabled: search/criteria_reference/iscurrencyenabled_criterion.md
- IsFieldEmpty: search/criteria_reference/isfieldempty_criterion.md
- IsMainLocation: search/criteria_reference/ismainlocation_criterion.md
Expand Down