diff --git a/src/bundle/Controller/Content/ContentTreeController.php b/src/bundle/Controller/Content/ContentTreeController.php index 2ba39eb81a..50142ab94b 100644 --- a/src/bundle/Controller/Content/ContentTreeController.php +++ b/src/bundle/Controller/Content/ContentTreeController.php @@ -23,7 +23,6 @@ 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; diff --git a/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php b/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php index 7c1d3ee46c..463dbb0ce4 100644 --- a/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php +++ b/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php @@ -8,8 +8,8 @@ namespace Ibexa\Bundle\AdminUi\ControllerArgumentResolver; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Rest\Input\Parser\Query\Criterion\CriterionProcessorInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; @@ -34,7 +34,11 @@ public function __construct( public function supports(Request $request, ArgumentMetadata $argument): bool { - return Criterion::class === $argument->getType() + if ($argument->getType() === null) { + return false; + } + + return is_a($argument->getType(), CriterionInterface::class, true) && 'filter' === $argument->getName(); }