/**
  * {@inheritdoc}
  */
 public function denormalize($data, $class, $format = null, array $context = [])
 {
     if ($data === null || $data === '') {
         return null;
     }
     $options = new ArrayCollection();
     foreach (explode(',', $data) as $optionCode) {
         $option = $this->denormalizer->denormalize($optionCode, AttributeTypes::OPTION_SIMPLE_SELECT, $format, $context);
         if (null !== $option) {
             $options->add($option);
         }
     }
     return $options;
 }
 /**
  * {@inheritdoc}
  */
 public function denormalize($data, $class, $format = null, array $context = [])
 {
     if ($data === null || $data === '') {
         return null;
     }
     $options = new ArrayCollection();
     foreach (explode(',', $data) as $optionCode) {
         $option = $this->denormalizer->denormalize($optionCode, 'pim_catalog_simpleselect', $format, $context);
         if (null !== $option) {
             $options->add($option);
         }
     }
     return $options;
 }