From 402ce518cb236955ad359a5d27a69f1881c2e6d4 Mon Sep 17 00:00:00 2001 From: mattamon Date: Mon, 13 May 2024 12:15:11 +0200 Subject: [PATCH] Remove additional hydrator service --- config/properties.yaml | 3 - .../Service/PropertyHydratorService.php | 71 ------------------- .../PropertyHydratorServiceInterface.php | 33 --------- 3 files changed, 107 deletions(-) delete mode 100644 src/Property/Service/PropertyHydratorService.php delete mode 100644 src/Property/Service/PropertyHydratorServiceInterface.php diff --git a/config/properties.yaml b/config/properties.yaml index 83a49268d..f178e3c94 100644 --- a/config/properties.yaml +++ b/config/properties.yaml @@ -15,9 +15,6 @@ services: Pimcore\Bundle\StudioBackendBundle\Property\RepositoryInterface: class: Pimcore\Bundle\StudioBackendBundle\Property\Repository - Pimcore\Bundle\StudioBackendBundle\Property\Service\PropertyHydratorServiceInterface: - class: Pimcore\Bundle\StudioBackendBundle\Property\Service\PropertyHydratorService - Pimcore\Bundle\StudioBackendBundle\Property\Service\PropertyServiceInterface: class: Pimcore\Bundle\StudioBackendBundle\Property\Service\PropertyService diff --git a/src/Property/Service/PropertyHydratorService.php b/src/Property/Service/PropertyHydratorService.php deleted file mode 100644 index 0d8cda795..000000000 --- a/src/Property/Service/PropertyHydratorService.php +++ /dev/null @@ -1,71 +0,0 @@ -repository->listProperties($parameters); - $hydratedProperties = []; - foreach ($properties->load() as $property) { - $hydratedProperties[] = $this->predefinedPropertyHydrator->hydrate($property); - } - - return $hydratedProperties; - } - - public function getHydratedPropertyForElement(string $elementType, int $id): array - { - $element = $this->getElement($this->serviceResolver, $elementType, $id); - - $hydratedProperties = []; - - foreach($element->getProperties() as $property) { - $hydratedProperties[] = $this->dataPropertyHydrator->hydrate($property); - } - - return ['items' => $hydratedProperties]; - } - - public function getHydratedPredefinedProperty(Predefined $predefined): PredefinedProperty - { - return $this->predefinedPropertyHydrator->hydrate($predefined); - } -} diff --git a/src/Property/Service/PropertyHydratorServiceInterface.php b/src/Property/Service/PropertyHydratorServiceInterface.php deleted file mode 100644 index 1bc0a345f..000000000 --- a/src/Property/Service/PropertyHydratorServiceInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -