From 8eb59a02ae70e3d8340aa769ab3cb20022977320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C4=85browski?= <64841871+dabrt@users.noreply.github.com> Date: Wed, 19 Nov 2025 11:31:50 +0100 Subject: [PATCH] IBX-10937: Document the ContentTypeGroupName criterion for Find CTs API --- .../api/public_php_api/src/Command/FindContentTypeCommand.php | 2 +- .../content_type_search_reference/content_type_criteria.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php b/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php index a47f31d2a7..d8287a0229 100644 --- a/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php +++ b/code_samples/api/public_php_api/src/Command/FindContentTypeCommand.php @@ -27,7 +27,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int // Find content types from the "Content" group that contains a specific field definition (in this case, a "Body" field). $query = new ContentTypeQuery( new Criterion\LogicalAnd([ - new Criterion\ContentTypeGroupId([1]), + new Criterion\ContentTypeGroupName(['Content']), new Criterion\ContainsFieldDefinitionId([121]), ]), [ diff --git a/docs/search/content_type_search_reference/content_type_criteria.md b/docs/search/content_type_search_reference/content_type_criteria.md index 53ba40ccf4..d4822ca2e8 100644 --- a/docs/search/content_type_search_reference/content_type_criteria.md +++ b/docs/search/content_type_search_reference/content_type_criteria.md @@ -12,6 +12,7 @@ Content Type Search Criteria are only supported by [Content Type Search (`Conten |-------|-------------| | [ContainsFieldDefinitionId](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-ContainsFieldDefinitionId.html) | Matches content types that contain a field definition with the specified ID. | | [ContentTypeGroupId](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-ContentTypeGroupId.html) | Matches content types by their assigned group ID. | +| [ContentTypeGroupName](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-ContentTypeGroupName.html) | Matches content types by the name of their assigned group. | | [ContentTypeId](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-ContentTypeId.html) | Matches content types by their ID. | | [ContentTypeIdentifier](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-ContentTypeIdentifier.html) | Matches content types by their identifier. | | [IsSystem](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-ContentType-Query-Criterion-IsSystem.html) | Matches content types based on whether the group they belong to is system or not. |