/**
  * {@inheritdoc}
  */
 public function normalize($category, $format = null, array $context = [])
 {
     return ['code' => $category->getCode(), 'parent' => null !== $category->getParent() ? $category->getParent()->getCode() : null, 'labels' => $this->translationNormalizer->normalize($category, 'standard', $context)];
 }
 /**
  * {@inheritdoc}
  */
 public function normalize($associationType, $format = null, array $context = [])
 {
     return ['code' => $associationType->getCode(), 'labels' => $this->translationNormalizer->normalize($associationType, 'standard', $context)];
 }
 /**
  * {@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($groupType, $format = null, array $context = [])
 {
     return ['code' => $groupType->getCode(), 'is_variant' => (bool) $groupType->isVariant(), 'labels' => $this->translationNormalizer->normalize($groupType, 'standard', $context)];
 }
 /**
  * {@inheritdoc}
  *
  * @param AttributeInterface $attribute
  */
 public function normalize($attribute, $format = null, array $context = [])
 {
     return ['code' => $attribute->getCode(), 'type' => $attribute->getAttributeType(), 'group' => $attribute->getGroup() ? $attribute->getGroup()->getCode() : null, 'unique' => (bool) $attribute->isUnique(), 'useable_as_grid_filter' => (bool) $attribute->isUseableAsGridFilter(), 'allowed_extensions' => $attribute->getAllowedExtensions(), 'metric_family' => '' === $attribute->getMetricFamily() ? null : $attribute->getMetricFamily(), 'default_metric_unit' => '' === $attribute->getDefaultMetricUnit() ? null : $attribute->getDefaultMetricUnit(), 'reference_data_name' => $attribute->getReferenceDataName(), 'available_locales' => $attribute->getLocaleSpecificCodes(), 'max_characters' => null === $attribute->getMaxCharacters() ? null : (int) $attribute->getMaxCharacters(), 'validation_rule' => '' === $attribute->getValidationRule() ? null : $attribute->getValidationRule(), 'validation_regexp' => '' === $attribute->getValidationRegexp() ? null : $attribute->getValidationRegexp(), 'wysiwyg_enabled' => (bool) $attribute->isWysiwygEnabled(), 'number_min' => null === $attribute->getNumberMin() ? null : (string) $attribute->getNumberMin(), 'number_max' => null === $attribute->getNumberMax() ? null : (string) $attribute->getNumberMax(), 'decimals_allowed' => (bool) $attribute->isDecimalsAllowed(), 'negative_allowed' => (bool) $attribute->isNegativeAllowed(), 'date_min' => $this->dateTimeNormalizer->normalize($attribute->getDateMin()), 'date_max' => $this->dateTimeNormalizer->normalize($attribute->getDateMax()), 'max_file_size' => null === $attribute->getMaxFileSize() ? null : (string) $attribute->getMaxFileSize(), 'minimum_input_length' => null === $attribute->getMinimumInputLength() ? null : (int) $attribute->getMinimumInputLength(), 'sort_order' => (int) $attribute->getSortOrder(), 'localizable' => (bool) $attribute->isLocalizable(), 'scopable' => (bool) $attribute->isScopable(), 'labels' => $this->translationNormalizer->normalize($attribute, $format, $context)];
 }
 /**
  * {@inheritdoc}
  */
 public function normalize($group, $format = null, array $context = [])
 {
     return ['code' => $group->getCode(), 'type' => $group->getType()->getCode(), 'labels' => $this->translationNormalizer->normalize($group, 'standard', $context)];
 }
 /**
  * {@inheritdoc}
  */
 public function normalize($family, $format = null, array $context = [])
 {
     return ['code' => $family->getCode(), 'attributes' => $this->normalizeAttributes($family), 'attribute_as_label' => null !== $family->getAttributeAsLabel() ? $family->getAttributeAsLabel()->getCode() : null, 'attribute_requirements' => $this->normalizeRequirements($family), 'labels' => $this->translationNormalizer->normalize($family, 'standard', $context)];
 }
 /**
  * {@inheritdoc}
  */
 public function normalize($variantGroup, $format = null, array $context = [])
 {
     return ['code' => $variantGroup->getCode(), 'type' => $variantGroup->getType()->getCode(), 'axes' => $this->normalizeAxesAttributes($variantGroup), 'values' => $this->normalizeVariantGroupValues($variantGroup), 'labels' => $this->translationNormalizer->normalize($variantGroup, 'standard', $context)];
 }