/**
  * @param Option[] $options
  * @param $imageData
  * @param $parent Image
  */
 protected function createImagesForOptions($options, $imageData, $parent)
 {
     $articleId = $parent->getArticle()->getId();
     $imageData['path'] = null;
     $imageData['parent'] = $parent;
     $join = '';
     foreach ($options as $option) {
         $alias = 'alias' . $option->getId();
         $join = $join . ' INNER JOIN s_article_configurator_option_relations alias' . $option->getId() . ' ON ' . $alias . '.option_id = ' . $option->getId() . ' AND ' . $alias . '.article_id = d.id ';
     }
     $sql = "SELECT d.id\n                FROM s_articles_details d\n        " . $join . "\n        WHERE d.articleID = " . (int) $articleId;
     $details = $this->db->fetchCol($sql);
     foreach ($details as $detailId) {
         $detail = $this->manager->getReference(Detail::class, $detailId);
         $image = new Image();
         $image->fromArray($imageData);
         $image->setArticleDetail($detail);
         $this->manager->persist($image);
     }
 }