Skip to content

Commit

Permalink
IBX-7418: ContentName search criterion added (#2364)
Browse files Browse the repository at this point in the history
* ContentName search criterion added

* mkdocs updated

* Fixes after review

* Fixes

* Fix

* typo

* Fix
  • Loading branch information
julitafalcondusza authored and mnocon committed Jul 9, 2024
1 parent 66c9ddf commit e8544d8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/search/criteria_reference/contentname_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ContentName Criterion

The [`ContentName` Search Criterion](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/Query/Criterion/ContentName.php)
searches for content by its name.

## Arguments

- `value` - string representing the content name, the wildcard character `*` can be used for partial search

## Example

### PHP

``` php
$query->query = new Criterion\ContentName('*phone');
```

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentNameCriterion>*phone</ContentNameCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentNameCriterion": "*phone"
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Due to this storage limitation, searching content using the Country Field Type o
|-----|-----|-----|-----|-----|
|[Ancestor](ancestor_criterion.md)|Whether the content item is an ancestor of the provided Location|&#10004; |&#10004; |&#10004; |
|[ContentId](contentid_criterion.md)|Content item's ID|&#10004; |&#10004; |&#10004; |
|[ContentName](contentname_criterion.md)|Content item's name|&#10004; |&#10004; |&#10004; |
|[ContentTypeGroupId](contenttypegroupid_criterion.md)|ID of the content item's content type group|&#10004; |&#10004; |&#10004; |
|[ContentTypeId](contenttypeid_criterion.md)|ID of the content item's content type|&#10004; |&#10004; |&#10004; |
|[ContentTypeIdentifier](contenttypeidentifier_criterion.md)|Identifier of the content item's content type|&#10004; |&#10004; |&#10004; |
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ nav:
- Search Criteria reference: search/criteria_reference/search_criteria_reference.md
- Ancestor: search/criteria_reference/ancestor_criterion.md
- ContentId: search/criteria_reference/contentid_criterion.md
- ContentName: search/criteria_reference/contentname_criterion.md
- ContentTypeGroupId: search/criteria_reference/contenttypegroupid_criterion.md
- ContentTypeId: search/criteria_reference/contenttypeid_criterion.md
- ContentTypeIdentifier: search/criteria_reference/contenttypeidentifier_criterion.md
Expand Down

0 comments on commit e8544d8

Please sign in to comment.