/**
  * Remove an association type
  *
  * @param AssociationType $associationType
  *
  * @AclAncestor("pim_enrich_association_type_remove")
  * @return Response|RedirectResponse
  */
 public function removeAction(AssociationType $associationType)
 {
     $this->assocTypeManager->remove($associationType);
     if ($this->getRequest()->isXmlHttpRequest()) {
         return new Response('', 204);
     } else {
         return $this->redirectToRoute('pim_enrich_association_type_index');
     }
 }
 /**
  * Prepare fields list for CSV headers
  *
  * @param array $attributesList
  *
  * @return array
  */
 protected function prepareFieldsList(array $attributesList = [])
 {
     $fieldsList = $this->prepareAttributesList($attributesList);
     $fieldsList[] = ProductNormalizer::FIELD_FAMILY;
     $fieldsList[] = ProductNormalizer::FIELD_CATEGORY;
     $fieldsList[] = ProductNormalizer::FIELD_GROUPS;
     $associationTypes = $this->assocTypeManager->getAssociationTypes();
     foreach ($associationTypes as $associationType) {
         $fieldsList[] = sprintf('%s-groups', $associationType->getCode());
         $fieldsList[] = sprintf('%s-products', $associationType->getCode());
     }
     return $fieldsList;
 }