From 0cde6b57e28186528359e4d775eb933b33d721b7 Mon Sep 17 00:00:00 2001 From: Thomas Decaux Date: Fri, 18 Oct 2024 17:34:34 +0200 Subject: [PATCH] fix brand entity serialize group --- src/Model/Brand.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Model/Brand.php b/src/Model/Brand.php index d58be5c1..2fbc56b0 100644 --- a/src/Model/Brand.php +++ b/src/Model/Brand.php @@ -4,6 +4,8 @@ namespace Loevgaard\SyliusBrandPlugin\Model; +use JMS\Serializer\Annotation as Serializer; + class Brand implements BrandInterface { use ProductsAwareTrait { @@ -13,13 +15,22 @@ class Brand implements BrandInterface ImagesAwareTrait::__construct as private __imagesAwareTraitConstruct; } - /** @var int */ + /** + * @var int + * @Serializer\Groups({"Autocomplete"}) + */ protected $id; - /** @var string|null */ + /** + * @var string|null + * @Serializer\Groups({"Autocomplete"}) + */ protected $code; - /** @var string|null */ + /** + * @var string|null + * @Serializer\Groups({"Autocomplete"}) + */ protected $name; public function __construct()