Skip to content

Conversation

mnocon
Copy link
Contributor

@mnocon mnocon commented Sep 17, 2025

No description provided.

@mnocon mnocon force-pushed the IBX-9737-criterions branch from 81df162 to 7d21645 Compare September 17, 2025 08:54
Copy link

github-actions bot commented Sep 17, 2025

Copy link

github-actions bot commented Oct 2, 2025

code_samples/ change report

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

code_samples/collaboration/src/Query/Search.php


code_samples/collaboration/src/Query/Search.php

docs/search/collaboration_search_reference/collaboration_criteria.md@47:```php hl_lines="11-16"
docs/search/collaboration_search_reference/collaboration_criteria.md@48:[[= include_file('code_samples/collaboration/src/Query/Search.php') =]]
docs/search/collaboration_search_reference/collaboration_criteria.md@49:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶use Ibexa\Contracts\Collaboration\Session\Query\Criterion;
006⫶use Ibexa\Contracts\Collaboration\Session\Query\SortClause;
007⫶use Ibexa\Contracts\Collaboration\Session\SessionQuery;
008⫶
009⫶$now = new DateTimeImmutable();
010⫶
011❇️$query = new SessionQuery(
012❇️ new Criterion\LogicalAnd([
013❇️ new Criterion\IsActive(),
014❇️ new Criterion\Type(‘content’),
015❇️ new Criterion\CreatedAt($now, Criterion\CreatedAt::OPERATOR_LTE),
016❇️ ]),
017⫶ [
018⫶ new SortClause\CreatedAt(SortClause\CreatedAt::SORT_DESC),
019⫶ ]
020⫶);
021⫶
022⫶/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */
023⫶$results = $sessionService->findSessions($query);

Download colorized diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants