Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Aug 30, 2024
2 parents c0d2f7f + 1f87fe4 commit c413b12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/bundle/Controller/Content/ContentTreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
use Ibexa\Contracts\Core\Repository\Values\Content\Query;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;
use Ibexa\Contracts\Core\Repository\Values\User\Limitation;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Rest\Message;
Expand Down Expand Up @@ -78,7 +79,7 @@ public function loadChildrenAction(
int $parentLocationId,
int $limit,
int $offset,
Query\Criterion $filter
?Criterion $filter
): Node {
$location = $this->locationService->loadLocation($parentLocationId);
$loadSubtreeRequestNode = new LoadSubtreeRequestNode($parentLocationId, $limit, $offset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,20 @@ public function supports(Request $request, ArgumentMetadata $argument): bool
}

/**
* @return iterable<\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion>
* @return iterable<\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion|null>
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*/
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
yield new LogicalAnd($this->processFilterQueryCriteria($request));
$criteria = $this->processFilterQueryCriteria($request);
if ($argument->isNullable() && empty($criteria)) {
yield null;

return;
}

yield new LogicalAnd($criteria);
}

/**
Expand Down

0 comments on commit c413b12

Please sign in to comment.