-
Notifications
You must be signed in to change notification settings - Fork 15
IBX-10458: Implemented new Content Type search PHP API #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.6
Are you sure you want to change the base?
Conversation
701a49c
to
5c19221
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's focus first on establishing final shape of the contracts.
src/lib/Persistence/Legacy/Content/Type/Gateway/CriterionHandler/ContentTypeGroupIds.php
Outdated
Show resolved
Hide resolved
src/contracts/Repository/Values/ContentType/Query/Criterion/Identifiers.php
Outdated
Show resolved
Hide resolved
src/contracts/Repository/Values/ContentType/Query/Criterion/ContentTypeGroupIds.php
Outdated
Show resolved
Hide resolved
src/contracts/Repository/Values/ContentType/Query/Criterion/ContainsFieldDefinitionIds.php
Outdated
Show resolved
Hide resolved
src/contracts/Repository/Values/ContentType/Query/ContentTypeQuery.php
Outdated
Show resolved
Hide resolved
src/contracts/Repository/Values/ContentType/Query/CriterionHandlerInterface.php
Outdated
Show resolved
Hide resolved
b3df6c4
to
0859ce5
Compare
src/contracts/Persistence/Content/Type/CriterionHandlerInterface.php
Outdated
Show resolved
Hide resolved
src/contracts/Persistence/Content/Type/CriterionHandlerInterface.php
Outdated
Show resolved
Hide resolved
tests/integration/Core/Repository/ContentTypeService/FindContentTypesTest.php
Show resolved
Hide resolved
* @param TCriterion $criterion | ||
*/ | ||
public function supports(CriterionInterface $criterion): bool; | ||
|
||
/** | ||
* @param TCriterion $criterion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPStan types need to be prefixed with @phpstan-param
instead of @param
. Otherwise, most likely, it will crash phpDocumentor.
|
Description:
The
ContentTypeService
contract has been extended with two new methods:The
ContentTypeQuery
object receives the following arguments:And the available criterions are:
ContainsFieldDefinitionIds
(joins field definitions and validates if a content type contains them)ContentTypeGroupIds
(joins content type group assignment table and searches for provided group ids)Identifiers
(content type identifiers)Ids
(content type ids)IsSystem
(joins content type group table via content type group assignment table and validates if group is system or not)LogicalAnd
LogicalOr
LogicalNot
There are also available the following sort clauses:
Ibexa\Contracts\Core\Repository\Values\ContentType\Query\SortClause\Id
Ibexa\Contracts\Core\Repository\Values\ContentType\Query\SortClause\Identifiers
For QA:
Documentation: