Skip to content

Commit

Permalink
Adjusted Resolver supports method
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Dec 10, 2024
1 parent e1c5513 commit 1d1b0c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/bundle/Controller/Content/ContentTreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}

Expand Down

0 comments on commit 1d1b0c9

Please sign in to comment.