/** * {@inheritdoc} */ public function normalize($attributeGroup, $format = null, array $context = []) { return ['code' => $attributeGroup->getCode(), 'sort_order' => (int) $attributeGroup->getSortOrder(), 'attributes' => $this->attributeRepository->getAttributeCodesByGroup($attributeGroup), 'labels' => $this->translationNormalizer->normalize($attributeGroup, 'standard', $context)]; }
/** * {@inheritdoc} */ public function normalize($object, $format = null, array $context = []) { return ['code' => $object->getCode(), 'sortOrder' => $object->getSortOrder(), 'attributes' => $this->attributeRepository->getAttributeCodesByGroup($object)] + $this->transNormalizer->normalize($object, $format, $context); }