diff --git a/src/CoreShop/Bundle/ResourceBundle/Resources/config/services.yml b/src/CoreShop/Bundle/ResourceBundle/Resources/config/services.yml index 967d352712..79d2d0a353 100755 --- a/src/CoreShop/Bundle/ResourceBundle/Resources/config/services.yml +++ b/src/CoreShop/Bundle/ResourceBundle/Resources/config/services.yml @@ -25,6 +25,11 @@ services: - { name: jms_serializer.handler, type: relation, direction: serialization, format: json, method: serializeRelation} - { name: jms_serializer.handler, type: relation, direction: deserialization, format: json, method: deserializeRelation} + coreshop.jms_serializer.handler.pimcore_object: + class: CoreShop\Bundle\ResourceBundle\Serialization\PimcoreObjectHandler + tags: + - { name: jms_serializer.handler, type: pimcoreObject, direction: serialization, format: json, method: serializeRelation} + jms_serializer.object_constructor: alias: jms_serializer.doctrine_object_constructor public: false diff --git a/src/CoreShop/Bundle/ResourceBundle/Serialization/PimcoreObjectHandler.php b/src/CoreShop/Bundle/ResourceBundle/Serialization/PimcoreObjectHandler.php new file mode 100644 index 0000000000..de865a6ad4 --- /dev/null +++ b/src/CoreShop/Bundle/ResourceBundle/Serialization/PimcoreObjectHandler.php @@ -0,0 +1,29 @@ +getId(); + } + + return null; + } +}