Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.x' into 183-task-improve-mercure-docu-setu…
Browse files Browse the repository at this point in the history
…p-follow-up-mercure
  • Loading branch information
alexz707 committed Sep 23, 2024
2 parents 91ae05b + 85febaa commit 8543f6f
Show file tree
Hide file tree
Showing 48 changed files with 1,207 additions and 95 deletions.
3 changes: 3 additions & 0 deletions config/data_index_filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ services:
Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\TagFilter:
tags: [ 'pimcore.studio_backend.open_search.filter' ]

Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\PqlFilter:
tags: [ 'pimcore.studio_backend.open_search.filter' ]

# DataObject
Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\DataObject\ClassNameFilter:
tags: [ 'pimcore.studio_backend.open_search.data_object.filter' ]
Expand Down
30 changes: 16 additions & 14 deletions doc/03_Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ Here you can define `page`, `pageSize` and `includeDescendants`.

### ColumnFilter
It is also possible to filter the data by a column. This is done by adding a `columnFilter` to the `filter` property.
A `columnFilter` has a reference to the column and the value you want to filter by.
A `columnFilter` has a reference to the column and the value you want to filter by. Some filters do not require a
specific column, like the `system.tag` filter. This filters will be applied to the general search query.

Available filters are:

| Type | filterValue | Options |
|:-----------------:|:-------------------:|:---------------------------:|
| metadata.select | string | |
| metadata.date | object of timestamp | `from`, `to`, or `on` |
| metadata.input | string | |
| metadata.checkbox | boolean | |
| metadata.textarea | string | |
| metadata.object | integer | ID of the object |
| metadata.document | integer | ID fo the document |
| metadata.asset | integer | ID fo the asset |
| system.string | string | Wildcard search can be used |
| system.datetime | integer | `from`, `to`, or `on` |
| system.tag | object | `considerChildTags`, `tags` |
| Type | filterValue | Options | `key` required |
|:-----------------:|:-------------------:|:---------------------------:|:--------------:|
| metadata.select | string | | true |
| metadata.date | object of timestamp | `from`, `to`, or `on` | true |
| metadata.input | string | | true |
| metadata.checkbox | boolean | | true |
| metadata.textarea | string | | true |
| metadata.object | integer | ID of the object | true |
| metadata.document | integer | ID fo the document | true |
| metadata.asset | integer | ID fo the asset | true |
| system.string | string | Wildcard search can be used | true |
| system.datetime | integer | `from`, `to`, or `on` | true |
| system.tag | object | `considerChildTags`, `tags` | false |
| system.pql | string | PQL Query | false |



Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ services:
environment:
PHP_IDE_CONFIG: serverName=localhost
volumes:
- .:/var/cli/
- .:/var/cli/
- ./.docker/30-xdebug.ini:/usr/local/etc/php/conf.d/30-xdebug.ini
6 changes: 5 additions & 1 deletion src/DataIndex/Adapter/AssetSearchAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

namespace Pimcore\Bundle\StudioBackendBundle\DataIndex\Adapter;

use Exception;
use Pimcore\Bundle\GenericDataIndexBundle\Exception\AssetSearchException;
use Pimcore\Bundle\GenericDataIndexBundle\Model\Search\Asset\AssetSearch;
use Pimcore\Bundle\GenericDataIndexBundle\Model\Search\Modifier\Sort\Tree\OrderByFullPath;
Expand All @@ -26,6 +27,7 @@
use Pimcore\Bundle\StudioBackendBundle\DataIndex\AssetSearchResult;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Hydrator\HydratorServiceInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;
use function sprintf;
Expand All @@ -41,14 +43,16 @@ public function __construct(
}

/**
* @throws SearchException
* @throws SearchException|InvalidArgumentException
*/
public function searchAssets(QueryInterface $assetQuery): AssetSearchResult
{
try {
$searchResult = $this->searchService->search($assetQuery->getSearch());
} catch (AssetSearchException) {
throw new SearchException('assets');
} catch (Exception $e) {
throw new InvalidArgumentException($e->getMessage());
}

$result = [];
Expand Down
3 changes: 2 additions & 1 deletion src/DataIndex/Adapter/AssetSearchAdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
use Pimcore\Bundle\StudioBackendBundle\Asset\Schema\Asset;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\AssetSearchResult;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;

interface AssetSearchAdapterInterface
{
/**
* @throws SearchException
* @throws SearchException|InvalidArgumentException
*/
public function searchAssets(QueryInterface $assetQuery): AssetSearchResult;

Expand Down
3 changes: 2 additions & 1 deletion src/DataIndex/AssetSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Adapter\AssetSearchAdapterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Provider\AssetQueryProviderInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;
use function count;
Expand All @@ -42,7 +43,7 @@ public function __construct(
}

/**
* @throws SearchException
* @throws SearchException|InvalidArgumentException
*/
public function searchAssets(QueryInterface $assetQuery): AssetSearchResult
{
Expand Down
3 changes: 2 additions & 1 deletion src/DataIndex/AssetSearchServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
use Pimcore\Bundle\StudioBackendBundle\Asset\Schema\Type\Unknown;
use Pimcore\Bundle\StudioBackendBundle\Asset\Schema\Type\Video;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\SearchException;

interface AssetSearchServiceInterface
{
/**
* @throws SearchException
* @throws SearchException|InvalidArgumentException
*/
public function searchAssets(QueryInterface $assetQuery): AssetSearchResult;

Expand Down
6 changes: 3 additions & 3 deletions src/DataIndex/Filter/Asset/IsAssetFilterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset;

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\MappedParameter\Filter\ColumnFiltersParameterInterface;

/**
Expand All @@ -33,9 +33,9 @@ public function validateParameterType(mixed $parameters): ?ColumnFiltersParamete
return null;
}

public function validateQueryType(mixed $query): ?AssetQuery
public function validateQueryType(mixed $query): ?AssetQueryInterface
{
if ($query instanceof AssetQuery) {
if ($query instanceof AssetQueryInterface) {
return $query;
}

Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/AssetFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyAssetFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyAssetFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_int($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for asset must be a integer (ID of the asset)');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/CheckboxFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyCheckboxFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyCheckboxFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_bool($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for checkbox must be a boolean');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Pimcore\Bundle\GenericDataIndexBundle\Model\OpenSearch\Query\DateFilter as GenericDateFilter;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -49,7 +49,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyDateFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyDateFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_array($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for date must be an array');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/DocumentFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyDocumentFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyDocumentFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_int($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for document must be a integer (ID of the document)');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/InputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyInputFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyInputFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_string($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for input must be a string');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/ObjectFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyAssetFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyAssetFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_int($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for object must be a integer (ID of the object)');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/SelectFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applySelectFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applySelectFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_string($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for select must be a string');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/Metadata/TextAreaFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyTextAreaFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyTextAreaFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_string($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for textarea must be a string');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/SortFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\GenericDataIndexBundle\Enum\Search\SortDirection;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\MappedParameter\Filter\SortFilterParameterInterface;

Expand All @@ -29,7 +29,7 @@ final class SortFilter implements FilterInterface
{
public function apply(mixed $parameters, QueryInterface $query): QueryInterface
{
if (!$query instanceof AssetQuery) {
if (!$query instanceof AssetQueryInterface) {
return $query;
}

Expand Down
6 changes: 3 additions & 3 deletions src/DataIndex/Filter/Asset/System/DatetimeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyDatetimeFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyDatetimeFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_array($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for this filter must be an array');
Expand All @@ -57,7 +57,7 @@ private function applyDatetimeFilter(ColumnFilter $column, AssetQuery $query): A
$filterValue = $column->getFilterValue();

if (isset($filterValue['on'])) {
$query->filterDatetime($column->getKey(), null, $filterValue['on']);
$query->filterDatetime($column->getKey(), null, null, $filterValue['on']);
}

if (isset($filterValue['to'])) {
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/Asset/System/StringFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\Asset\IsAssetFilterTrait;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\AssetQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
use Pimcore\Bundle\StudioBackendBundle\Grid\Column\ColumnType;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
return $assetQuery;
}

private function applyStringFilter(ColumnFilter $column, AssetQuery $query): AssetQuery
private function applyStringFilter(ColumnFilter $column, AssetQueryInterface $query): AssetQueryInterface
{
if (!is_string($column->getFilterValue())) {
throw new InvalidArgumentException('Filter value for this filter must be a string');
Expand Down
4 changes: 2 additions & 2 deletions src/DataIndex/Filter/DataObject/ClassNameFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use Exception;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Filter\FilterInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\DataObjectQuery;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\DataObjectQueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Query\QueryInterface;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Request\ClassNameParametersInterface;

Expand All @@ -34,7 +34,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
{
if (
!$parameters instanceof ClassNameParametersInterface ||
!$query instanceof DataObjectQuery ||
!$query instanceof DataObjectQueryInterface ||
!$parameters->getClassName()
) {
return $query;
Expand Down
Loading

0 comments on commit 8543f6f

Please sign in to comment.