Skip to content

Commit

Permalink
FilteringCriterion check
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Feb 22, 2024
1 parent 46e94ab commit 07c0cf8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/Server/Input/Parser/FilterParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion as CriterionValue;
use Ibexa\Contracts\Core\Repository\Values\Filter\Filter;
use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion;
use Ibexa\Contracts\Rest\Exceptions;
use Ibexa\Contracts\Rest\Input\ParsingDispatcher;
use Ibexa\Rest\Input\BaseParser;
Expand All @@ -31,7 +32,11 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher): Filter
{
$filter = new Filter();
if (array_key_exists('criteria', $data) && is_array($data['criteria'])) {
$filter->andWithCriterion($this->processCriteriaArray($data['criteria'], $parsingDispatcher));
$criteria = $this->processCriteriaArray($data['criteria'], $parsingDispatcher);

if ($criteria instanceof FilteringCriterion) {
$filter->andWithCriterion($criteria);
}
}

// limit
Expand Down

0 comments on commit 07c0cf8

Please sign in to comment.