/**
  * Test if a product has grouped products
  * @param ProductInterface $product
  * @param string           $pimGrouped
  *
  * @return boolean
  */
 protected function hasGroupedProduct(ProductInterface $product, $pimGrouped)
 {
     if ($associationType = $this->associationTypeManager->getAssociationTypeByCode($pimGrouped)) {
         $association = $product->getAssociationForType($associationType);
         return null != $association && null != $association->getProducts() && null != $association->getGroups();
     } else {
         return false;
     }
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['pimUpSell' => ['type' => 'choice', 'options' => ['choices' => $this->associationTypeManager->getAssociationTypeChoices(), 'help' => 'pim_magento_connector.export.pimUpSell.help', 'label' => 'pim_magento_connector.export.pimUpSell.label', 'attr' => ['class' => 'select2']]], 'pimCrossSell' => ['type' => 'choice', 'options' => ['choices' => $this->associationTypeManager->getAssociationTypeChoices(), 'help' => 'pim_magento_connector.export.pimCrossSell.help', 'label' => 'pim_magento_connector.export.pimCrossSell.label', 'attr' => ['class' => 'select2']]], 'pimRelated' => ['type' => 'choice', 'options' => ['choices' => $this->associationTypeManager->getAssociationTypeChoices(), 'help' => 'pim_magento_connector.export.pimRelated.help', 'label' => 'pim_magento_connector.export.pimRelated.label', 'attr' => ['class' => 'select2']]], 'pimGrouped' => ['type' => 'choice', 'options' => ['choices' => $this->associationTypeManager->getAssociationTypeChoices(), 'help' => 'pim_magento_connector.export.pimGrouped.help', 'label' => 'pim_magento_connector.export.pimGrouped.label', 'attr' => ['class' => 'select2']]]]);
 }
 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['smallImageAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_magento_connector.export.smallImageAttribute.help', 'label' => 'pim_magento_connector.export.smallImageAttribute.label', 'attr' => ['class' => 'select2']]], 'baseImageAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_magento_connector.export.baseImageAttribute.help', 'label' => 'pim_magento_connector.export.baseImageAttribute.label', 'attr' => ['class' => 'select2']]], 'thumbnailAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_magento_connector.export.thumbnailAttribute.help', 'label' => 'pim_magento_connector.export.thumbnailAttribute.label', 'attr' => ['class' => 'select2']]], 'pimGrouped' => ['type' => 'choice', 'options' => ['choices' => $this->associationTypeManager->getAssociationTypeChoices(), 'help' => 'pim_magento_connector.export.pimGrouped.help', 'label' => 'pim_magento_connector.export.pimGrouped.label', 'attr' => ['class' => 'select2']]]]);
 }