Skip to content

Added doc for TaxonomyNoEntries#3082

Open
mnocon wants to merge 3 commits into4.6from
ibx-6365-TaxonomyNoEntries-criterion
Open

Added doc for TaxonomyNoEntries#3082
mnocon wants to merge 3 commits into4.6from
ibx-6365-TaxonomyNoEntries-criterion

Conversation

@mnocon
Copy link
Contributor

@mnocon mnocon commented Mar 11, 2026

Doc for https://github.com/ibexa/taxonomy/pull/404

Target: 4.6, v5

PHPStan will not be happy until https://github.com/ibexa/taxonomy/pull/404 is merged

Update: as suggested in review, this PR also adds the missing TaxonomySubtree criterion

@github-actions
Copy link

github-actions bot commented Mar 11, 2026

@mnocon mnocon force-pushed the ibx-6365-TaxonomyNoEntries-criterion branch 2 times, most recently from d990996 to 10ca6d8 Compare March 11, 2026 11:25
@mnocon mnocon marked this pull request as ready for review March 11, 2026 11:25
@mnocon mnocon requested a review from barw4 March 11, 2026 11:26

# TaxonomyNoEntries Criterion

The [`TaxonomyNoEntries` Search Criterion](https://example.com/api/php_api/php_api_reference/classes/Ibexa-Contracts-Taxonomy-Search-Query-Criterion-TaxonomyNoEntries.html) searches for content that has no entries assigned from the specified [taxonomy](taxonomy.md).
Copy link
Contributor Author

@mnocon mnocon Mar 11, 2026

Choose a reason for hiding this comment

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

The example.com is a TMP change that must be removed before merge - the criterion is not part of the PHP API reference until it's released

@mnocon mnocon force-pushed the ibx-6365-TaxonomyNoEntries-criterion branch from 10ca6d8 to b586e26 Compare March 11, 2026 11:29
Copy link
Contributor

@barw4 barw4 left a comment

Choose a reason for hiding this comment

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

LGTM aside from one unrelated change. Is there any reason why we have no documentation about src/contracts/Search/Query/Criterion/TaxonomySubtree.php?

@mnocon mnocon force-pushed the ibx-6365-TaxonomyNoEntries-criterion branch from b1c1c2d to 8500d82 Compare March 11, 2026 12:38
@github-actions
Copy link

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/search/content/taxonomy_no_entries_criterion.php


code_samples/search/content/taxonomy_no_entries_criterion.php

docs/search/criteria_reference/taxonomy_no_entries.md@22:```php hl_lines="11-14"
docs/search/criteria_reference/taxonomy_no_entries.md@23:[[= include_file('code_samples/search/content/taxonomy_no_entries_criterion.php') =]]
docs/search/criteria_reference/taxonomy_no_entries.md@24:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query;
006⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier;
007⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd;
008⫶use Ibexa\Contracts\Taxonomy\Search\Query\Criterion\TaxonomyNoEntries;
009⫶
010⫶$query = new Query();
011❇️$query->query = new LogicalAnd(
012❇️ [
013❇️ new TaxonomyNoEntries('tags'),
014❇️ new ContentTypeIdentifier('article'),
015⫶ ]
016⫶);
017⫶
018⫶/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */
019⫶$results = $searchService->findContent($query);


code_samples/search/content/taxonomy_subtree_criterion.php


code_samples/search/content/taxonomy_subtree_criterion.php

docs/search/criteria_reference/taxonomy_subtree.md@19:```php hl_lines="11-14"
docs/search/criteria_reference/taxonomy_subtree.md@20:[[= include_file('code_samples/search/content/taxonomy_subtree_criterion.php') =]]
docs/search/criteria_reference/taxonomy_subtree.md@21:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query;
006⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier;
007⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd;
008⫶use Ibexa\Contracts\Taxonomy\Search\Query\Criterion\TaxonomySubtree;
009⫶
010⫶$query = new Query();
011❇️$query->query = new LogicalAnd(
012❇️ [
013❇️ new TaxonomySubtree(42),
014❇️ new ContentTypeIdentifier('article'),
015⫶ ]
016⫶);
017⫶
018⫶/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */
019⫶$results = $searchService->findContent($query);

Download colorized diff

@mnocon
Copy link
Contributor Author

mnocon commented Mar 11, 2026

Thanks, doc for Taxonomy Subtree added in 91bb827

@mnocon mnocon requested a review from barw4 March 11, 2026 12:48
@sonarqubecloud
Copy link

@mnocon mnocon requested a review from a team March 11, 2026 13:55
@mnocon mnocon added the Wait with merge PRs that shouldn't be merged instantly label Mar 11, 2026
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 bot requested review from adriendupuis, dabrt and julitafalcondusza and removed request for a team March 11, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs DOC review Wait with merge PRs that shouldn't be merged instantly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants