/**
  * Extract a variant group from column "groups"
  *
  * @param string $value
  *
  * @return array
  */
 protected function extractVariantGroup($value)
 {
     $data = [];
     $groups = $this->fieldSplitter->splitCollection($value);
     foreach ($groups as $group) {
         $isVariant = $this->groupTypeRepository->getTypeByGroup($group);
         if ('1' === $isVariant) {
             $data['variant_group'][] = $group;
         } else {
             $data['groups'][] = $group;
         }
     }
     if (isset($data['variant_group']) && 1 < count($data['variant_group'])) {
         throw new \InvalidArgumentException(sprintf('The product cannot belong to many variant groups: %s', implode(', ', $data['variant_group'])));
     } elseif (isset($data['variant_group'])) {
         $data['variant_group'] = current($data['variant_group']);
     }
     return $data;
 }
 /**
  * @param string $column
  *
  * @return string
  */
 protected function getColumnCode($column)
 {
     $splitedColumn = $this->fieldSplitter->splitFieldName($column);
     return is_array($splitedColumn) ? $splitedColumn[0] : $column;
 }