Skip to content

Commit

Permalink
Fixed subitems filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Aug 23, 2024
1 parent 471396a commit ff28fa7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 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,14 +79,18 @@ public function loadChildrenAction(
int $parentLocationId,
int $limit,
int $offset,
Query\Criterion $filter
Criterion\LogicalAnd $filter
): Node {
$location = $this->locationService->loadLocation($parentLocationId);
$loadSubtreeRequestNode = new LoadSubtreeRequestNode($parentLocationId, $limit, $offset);

$sortClause = $request->query->get('sortClause', null);
$sortOrder = $request->query->getAlpha('sortOrder', Query::SORT_ASC);

if (empty($filter->criteria)) {
$filter = null;
}

return $this->contentTreeNodeFactory->createNode(
$location,
$loadSubtreeRequestNode,
Expand Down

0 comments on commit ff28fa7

Please sign in to comment.