/** * Normalize the attributes * * @param FamilyInterface $family * * @return array */ protected function normalizeAttributes(FamilyInterface $family) { $attributes = $this->collectionFilter->filterCollection($this->attributeRepository->findAttributesByFamily($family), 'pim.internal_api.attribute.view'); $normalizedAttributes = []; foreach ($attributes as $attribute) { $normalizedAttributes[] = $attribute->getCode(); } sort($normalizedAttributes); return $normalizedAttributes; }