Skip to content

Commit 8d963d4

Browse files
IBX-7418: ContentName search criterion added (#2364)
* ContentName search criterion added * mkdocs updated * Fixes after review * Fixes * Fix * typo * Fix
1 parent 827dbb7 commit 8d963d4

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ContentName Criterion
2+
3+
The [`ContentName` Search Criterion](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/Query/Criterion/ContentName.php)
4+
searches for content by its name.
5+
6+
## Arguments
7+
8+
- `value` - string representing the content name, the wildcard character `*` can be used for partial search
9+
10+
## Example
11+
12+
### PHP
13+
14+
``` php
15+
$query->query = new Criterion\ContentName('*phone');
16+
```
17+
18+
### REST API
19+
20+
=== "XML"
21+
22+
```xml
23+
<Query>
24+
<Filter>
25+
<ContentNameCriterion>*phone</ContentNameCriterion>
26+
</Filter>
27+
</Query>
28+
```
29+
30+
=== "JSON"
31+
32+
```json
33+
"Query": {
34+
"Filter": {
35+
"ContentNameCriterion": "*phone"
36+
}
37+
}
38+
```

docs/search/criteria_reference/search_criteria_reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Due to this storage limitation, searching content using the Country Field Type o
2525
|-----|-----|-----|-----|-----|
2626
|[Ancestor](ancestor_criterion.md)|Whether the content item is an ancestor of the provided Location|&#10004; |&#10004; |&#10004; |
2727
|[ContentId](contentid_criterion.md)|Content item's ID|&#10004; |&#10004; |&#10004; |
28+
|[ContentName](contentname_criterion.md)|Content item's name|&#10004; |&#10004; |&#10004; |
2829
|[ContentTypeGroupId](contenttypegroupid_criterion.md)|ID of the content item's content type group|&#10004; |&#10004; |&#10004; |
2930
|[ContentTypeId](contenttypeid_criterion.md)|ID of the content item's content type|&#10004; |&#10004; |&#10004; |
3031
|[ContentTypeIdentifier](contenttypeidentifier_criterion.md)|Identifier of the content item's content type|&#10004; |&#10004; |&#10004; |

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ nav:
471471
- Search Criteria reference: search/criteria_reference/search_criteria_reference.md
472472
- Ancestor: search/criteria_reference/ancestor_criterion.md
473473
- ContentId: search/criteria_reference/contentid_criterion.md
474+
- ContentName: search/criteria_reference/contentname_criterion.md
474475
- ContentTypeGroupId: search/criteria_reference/contenttypegroupid_criterion.md
475476
- ContentTypeId: search/criteria_reference/contenttypeid_criterion.md
476477
- ContentTypeIdentifier: search/criteria_reference/contenttypeidentifier_criterion.md

0 commit comments

Comments
 (0)