/**
  * Prepare products for bundle items.
  *
  * @return void
  */
 protected function prepareProducts()
 {
     if (!empty($this->data['products'])) {
         $productsSelections = $this->data['products'];
         $this->data['products'] = [];
         foreach ($productsSelections as $index => $products) {
             $productSelection = [];
             foreach ($products as $key => $product) {
                 if ($product instanceof FixtureInterface) {
                     $productSelection[$key] = $product;
                     continue;
                 }
                 list($fixture, $dataset) = explode('::', $product);
                 $productSelection[$key] = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]);
                 $productSelection[$key]->persist();
                 $this->data['bundle_options'][$index]['assigned_products'][$key]['search_data']['name'] = $productSelection[$key]->getName();
             }
             $this->data['products'][] = $productSelection;
         }
     }
 }