From d8045bf6564787d87e24db97276d3c74f9cb5e90 Mon Sep 17 00:00:00 2001 From: Martin Eiber Date: Thu, 4 Dec 2025 11:04:55 +0100 Subject: [PATCH 1/4] Add groupId to request --- .../Controller/GetLayoutByKeyController.php | 11 ++++++++--- .../Repository/KeyGroupRelationRepository.php | 5 +++-- .../KeyGroupRelationRepositoryInterface.php | 2 +- .../Service/KeyGroupLayoutService.php | 5 +++-- .../Service/KeyGroupLayoutServiceInterface.php | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ClassificationStore/Controller/GetLayoutByKeyController.php b/src/ClassificationStore/Controller/GetLayoutByKeyController.php index ca184acf0..2cee876bf 100644 --- a/src/ClassificationStore/Controller/GetLayoutByKeyController.php +++ b/src/ClassificationStore/Controller/GetLayoutByKeyController.php @@ -55,13 +55,13 @@ public function __construct( * @throws NotFoundException */ #[Route( - path: '/classification-store/layout-by-key/{keyId}', + path: '/classification-store/layout-by-key/{keyId}/{groupId}', name: 'pimcore_studio_api_classification_store_get_layout_by_key', methods: ['GET'] )] #[IsGranted(UserPermissions::DATA_OBJECTS->value)] #[Get( - path: self::PREFIX . '/classification-store/layout-by-key/{keyId}', + path: self::PREFIX . '/classification-store/layout-by-key/{keyId}/{groupId}', operationId: 'classification_store_get_layout_by_key', description: 'classification_store_get_layout_by_key_description', summary: 'classification_store_get_layout_by_key_summary', @@ -80,6 +80,10 @@ public function __construct( type: 'Key ID', name: 'keyId', )] + #[PathIdParameter( + type: 'Group ID', + name: 'groupId', + )] #[TextFieldParameter( name: 'fieldName', description: 'Field Name', @@ -94,9 +98,10 @@ public function __construct( public function getLayoutByKey( #[MapQueryString] LayoutParameter $layoutParameter, int $keyId, + int $groupId ): JsonResponse { return $this->jsonResponse( - $this->keyGroupLayoutService->getKeyLayout($layoutParameter, $keyId) + $this->keyGroupLayoutService->getKeyLayout($layoutParameter, $keyId, $groupId) ); } } diff --git a/src/ClassificationStore/Repository/KeyGroupRelationRepository.php b/src/ClassificationStore/Repository/KeyGroupRelationRepository.php index 698d610eb..3c2d2c7ba 100644 --- a/src/ClassificationStore/Repository/KeyGroupRelationRepository.php +++ b/src/ClassificationStore/Repository/KeyGroupRelationRepository.php @@ -70,11 +70,12 @@ public function getByGroupId(int $groupId): array /** * @inheritDoc */ - public function getByKeyId(int $keyId): KeyGroupRelation + public function getByKeyId(int $keyId, int $groupId): KeyGroupRelation { $listing = new Listing(); $listing->setOrder('ASC'); - $listing->setCondition('id = ?', $keyId); + $listing->addConditionParam('keyId = ?', $keyId); + $listing->addConditionParam('groupId = ?', $groupId); $list = $listing->load(); diff --git a/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php b/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php index 5bb798bd5..c442e1b2f 100644 --- a/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php +++ b/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php @@ -42,5 +42,5 @@ public function getByGroupId(int $groupId): array; /** * @throws NotFoundException */ - public function getByKeyId(int $keyId): KeyGroupRelation; + public function getByKeyId(int $keyId, int $groupId): KeyGroupRelation; } diff --git a/src/ClassificationStore/Service/KeyGroupLayoutService.php b/src/ClassificationStore/Service/KeyGroupLayoutService.php index 7b2d6e108..af178fec6 100644 --- a/src/ClassificationStore/Service/KeyGroupLayoutService.php +++ b/src/ClassificationStore/Service/KeyGroupLayoutService.php @@ -76,7 +76,8 @@ public function getLayoutDefinition( */ public function getKeyLayout( LayoutParameter $layoutParameter, - int $keyId + int $keyId, + int $groupId ): KeyLayout { $object = null; @@ -88,7 +89,7 @@ public function getKeyLayout( } } - $key = $this->keyGroupRelationRepository->getByKeyId($keyId); + $key = $this->keyGroupRelationRepository->getByKeyId($keyId, $groupId); $definition = $this->getLayoutDefinition($key, $layoutParameter->getFieldName(), $object); return new KeyLayout( diff --git a/src/ClassificationStore/Service/KeyGroupLayoutServiceInterface.php b/src/ClassificationStore/Service/KeyGroupLayoutServiceInterface.php index da1d41128..7104d2427 100644 --- a/src/ClassificationStore/Service/KeyGroupLayoutServiceInterface.php +++ b/src/ClassificationStore/Service/KeyGroupLayoutServiceInterface.php @@ -38,5 +38,6 @@ public function getLayoutDefinition( public function getKeyLayout( LayoutParameter $layoutParameter, int $keyId, + int $groupId ): KeyLayout; } From 3ab4ea5981b83a0a9c0e9d5564c97f105de96349 Mon Sep 17 00:00:00 2001 From: Martin Eiber Date: Thu, 4 Dec 2025 11:13:49 +0100 Subject: [PATCH 2/4] Add groupID to filters --- .../Filter/DataObject/Classificationstore/BooleanFilter.php | 2 +- .../Filter/DataObject/Classificationstore/DateFilter.php | 2 +- .../Filter/DataObject/Classificationstore/DateTimeFilter.php | 2 +- .../DataObject/Classificationstore/InputQuantityValueFilter.php | 2 +- .../Filter/DataObject/Classificationstore/NumberFilter.php | 2 +- .../DataObject/Classificationstore/QuantityValueFilter.php | 2 +- .../Filter/DataObject/Classificationstore/RGBAFilter.php | 2 +- .../Filter/DataObject/Classificationstore/SelectFilter.php | 2 +- .../Filter/DataObject/Classificationstore/StringFilter.php | 2 +- .../Filter/DataObject/Classificationstore/TimeFilter.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php index 168665121..8c672669e 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php index 97bd4e82c..42dd9969d 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php @@ -50,7 +50,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATE->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, true); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php index 5faa9dbc8..383f77606 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php @@ -50,7 +50,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATETIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, false); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php index 556254b00..4a33fac77 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php @@ -54,7 +54,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php index 5160134a2..173e248c6 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php @@ -66,7 +66,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $this->addFilterToQuery( $query, $column, - $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()), + $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()), $this->groupConfigRepository->getById($filterValue->getGroupId()), $mode, $isValue, diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php index b7c7a1642..004e2d494 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php @@ -56,7 +56,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php index d7f53ef42..2a26d0bbb 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php index 023309d8c..8cc34976c 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php index b372a4f80..67663f475 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_string($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php index 98c7becdb..cb7e0356c 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_TIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId()); + $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyTimeFilter($column, $query, $key, $group, $filterValue); From ddaf16274052aecea4d6de31c7102a255952ede3 Mon Sep 17 00:00:00 2001 From: Martin Eiber Date: Thu, 4 Dec 2025 11:18:09 +0100 Subject: [PATCH 3/4] Rename methode --- .../Repository/KeyGroupRelationRepository.php | 2 +- .../Repository/KeyGroupRelationRepositoryInterface.php | 2 +- src/ClassificationStore/Service/KeyGroupLayoutService.php | 2 +- .../Filter/DataObject/Classificationstore/BooleanFilter.php | 2 +- .../Filter/DataObject/Classificationstore/DateFilter.php | 2 +- .../Filter/DataObject/Classificationstore/DateTimeFilter.php | 2 +- .../DataObject/Classificationstore/InputQuantityValueFilter.php | 2 +- .../Filter/DataObject/Classificationstore/NumberFilter.php | 2 +- .../DataObject/Classificationstore/QuantityValueFilter.php | 2 +- .../Filter/DataObject/Classificationstore/RGBAFilter.php | 2 +- .../Filter/DataObject/Classificationstore/SelectFilter.php | 2 +- .../Filter/DataObject/Classificationstore/StringFilter.php | 2 +- .../Filter/DataObject/Classificationstore/TimeFilter.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ClassificationStore/Repository/KeyGroupRelationRepository.php b/src/ClassificationStore/Repository/KeyGroupRelationRepository.php index 3c2d2c7ba..a2415203a 100644 --- a/src/ClassificationStore/Repository/KeyGroupRelationRepository.php +++ b/src/ClassificationStore/Repository/KeyGroupRelationRepository.php @@ -70,7 +70,7 @@ public function getByGroupId(int $groupId): array /** * @inheritDoc */ - public function getByKeyId(int $keyId, int $groupId): KeyGroupRelation + public function getByKeyGroupId(int $keyId, int $groupId): KeyGroupRelation { $listing = new Listing(); $listing->setOrder('ASC'); diff --git a/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php b/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php index c442e1b2f..e614b9aeb 100644 --- a/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php +++ b/src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php @@ -42,5 +42,5 @@ public function getByGroupId(int $groupId): array; /** * @throws NotFoundException */ - public function getByKeyId(int $keyId, int $groupId): KeyGroupRelation; + public function getByKeyGroupId(int $keyId, int $groupId): KeyGroupRelation; } diff --git a/src/ClassificationStore/Service/KeyGroupLayoutService.php b/src/ClassificationStore/Service/KeyGroupLayoutService.php index af178fec6..bafe59bc8 100644 --- a/src/ClassificationStore/Service/KeyGroupLayoutService.php +++ b/src/ClassificationStore/Service/KeyGroupLayoutService.php @@ -89,7 +89,7 @@ public function getKeyLayout( } } - $key = $this->keyGroupRelationRepository->getByKeyId($keyId, $groupId); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($keyId, $groupId); $definition = $this->getLayoutDefinition($key, $layoutParameter->getFieldName(), $object); return new KeyLayout( diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php index 8c672669e..3003c2924 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php index 42dd9969d..0213104f4 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php @@ -50,7 +50,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATE->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, true); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php index 383f77606..b9b323116 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php @@ -50,7 +50,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATETIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, false); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php index 4a33fac77..bbeb05f83 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php @@ -54,7 +54,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php index 173e248c6..59084fb95 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php @@ -66,7 +66,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $this->addFilterToQuery( $query, $column, - $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()), + $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()), $this->groupConfigRepository->getById($filterValue->getGroupId()), $mode, $isValue, diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php index 004e2d494..19762ebab 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php @@ -56,7 +56,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php index 2a26d0bbb..c637e98bb 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php index 8cc34976c..ef4029520 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php index 67663f475..117f0c806 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_string($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php index cb7e0356c..1c1812aba 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php @@ -53,7 +53,7 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_TIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyTimeFilter($column, $query, $key, $group, $filterValue); From d8181b2a0452a390c65b16a6d19fb016ea9c9eff Mon Sep 17 00:00:00 2001 From: Martin Eiber Date: Thu, 4 Dec 2025 11:21:17 +0100 Subject: [PATCH 4/4] Fix Line --- .../Filter/DataObject/Classificationstore/BooleanFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/DateFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/DateTimeFilter.php | 5 ++++- .../Classificationstore/InputQuantityValueFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/NumberFilter.php | 5 ++++- .../DataObject/Classificationstore/QuantityValueFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/RGBAFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/SelectFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/StringFilter.php | 5 ++++- .../Filter/DataObject/Classificationstore/TimeFilter.php | 5 ++++- 10 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php index 3003c2924..c6b1ba7dd 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php @@ -53,7 +53,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php index 0213104f4..7507d1cb7 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php @@ -50,7 +50,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATE->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, true); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php index b9b323116..d7bd82be4 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php @@ -50,7 +50,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_DATETIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyClassificationStoreDateFilter($column, $query, $key, $group, $filterValue, false); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php index bbeb05f83..de40fc9dd 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php @@ -54,7 +54,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php index 59084fb95..a42d57c24 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php @@ -66,7 +66,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $this->addFilterToQuery( $query, $column, - $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()), + $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ), $this->groupConfigRepository->getById($filterValue->getGroupId()), $mode, $isValue, diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php index 19762ebab..6179fb8fc 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php @@ -56,7 +56,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php index c637e98bb..c001302b0 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php @@ -53,7 +53,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); $value = $filterValue->getValue(); diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php index ef4029520..d54847746 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php @@ -53,7 +53,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_array($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php index 117f0c806..7b3ba51ec 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php @@ -53,7 +53,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); if (!is_string($filterValue->getValue())) { diff --git a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php index 1c1812aba..1ad6ff3e2 100644 --- a/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php +++ b/src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php @@ -53,7 +53,10 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface foreach ($parameters->getColumnFilterByType(ColumnType::CLASSIFICATION_STORE_TIME->value) as $column) { $filterValue = $this->getClassificationStoreFilterValue($column->getFilterValue()); - $key = $this->keyGroupRelationRepository->getByKeyGroupId($filterValue->getKeyId(), $filterValue->getGroupId()); + $key = $this->keyGroupRelationRepository->getByKeyGroupId( + $filterValue->getKeyId(), + $filterValue->getGroupId() + ); $group = $this->groupConfigRepository->getById($filterValue->getGroupId()); /** @var DataObjectQueryInterface $query */ $query = $this->applyTimeFilter($column, $query, $key, $group, $filterValue);