+
Skip to content

Conversation

barw4
Copy link
Contributor

@barw4 barw4 commented Aug 12, 2025

🎫 Issue IBX-10458

Caution

Table/column names/aliases mergup.

Description:

The ContentTypeService contract has been extended with a new method:

    public function findContentTypes(?ContentTypeQuery $query = null, array $prioritizedLanguages = []): SearchResult;

The ContentTypeQuery object receives the following arguments:

        ?CriterionInterface $criterion = null,
        array $sortClauses = [],
        int $offset = 0,
        int $limit = 25

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
  • Ibexa\Contracts\Core\Repository\Values\ContentType\Query\SortClause\Name

Examplary query:

            new ContentTypeQuery(
                new LogicalOr([
                    new LogicalAnd([
                        new ContentTypeIdentifier(['folder', 'article']),
                        new ContentTypeGroupId([1]),
                    ]),
                    new ContentTypeIdentifier(['user']),
                ]),
            ),

For QA:

Documentation:

@barw4 barw4 self-assigned this Aug 12, 2025
@barw4 barw4 added the Feature New feature request label Aug 12, 2025
@barw4 barw4 force-pushed the ibx-10458-content-type-search-papi branch from 701a49c to 5c19221 Compare August 12, 2025 08:06
@barw4 barw4 marked this pull request as ready for review August 13, 2025 08:30
@barw4 barw4 requested a review from a team August 13, 2025 08:31
@ezrobot ezrobot requested review from Steveb-p, ViniTou, adamwojs, alongosz, ciastektk, konradoboza, mikadamczyk, tbialcz and wiewiurdp and removed request for a team August 13, 2025 08:31
Copy link
Member

@adamwojs adamwojs left a 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.

@barw4 barw4 requested a review from adamwojs August 18, 2025 08:26
@barw4 barw4 force-pushed the ibx-10458-content-type-search-papi branch from b3df6c4 to 0859ce5 Compare August 20, 2025 11:59
@barw4 barw4 requested a review from adamwojs August 20, 2025 12:52
@mnocon mnocon added the Doc needed The changes require some documentation label Sep 2, 2025
@barw4 barw4 force-pushed the ibx-10458-content-type-search-papi branch from 69eebef to 6d12b78 Compare September 23, 2025 10:31
@barw4 barw4 requested a review from ViniTou September 23, 2025 19:14
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a piece of solid work! 💪

Few nitpicks:

Copy link

sonarqubecloud bot commented Oct 2, 2025

@adamwojs adamwojs merged commit 6292902 into 4.6 Oct 3, 2025
24 checks passed
@adamwojs adamwojs deleted the ibx-10458-content-type-search-papi branch October 3, 2025 15:43
@adamwojs
Copy link
Member

adamwojs commented Oct 3, 2025

You can merge up changes @barw4 (on Monday)

@barw4 barw4 mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Doc needed The changes require some documentation Feature New feature request Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载