Esempio n. 1
0
 /**
  * Do the initialization logic
  *
  * @return void
  */
 protected function doInitialize()
 {
     $collection = $this->collection;
     $ids = $collection->getKeys();
     $products = $this->repository->findByIds($ids);
     $this->collection = new ArrayCollection();
     foreach ($products as $product) {
         $lineItem = LineItemView::create($product, $collection->get($product->getId()));
         $this->collection->set($product->getId(), $lineItem);
     }
 }
Esempio n. 2
0
 /**
  * @inheritdoc
  */
 public function findByIds(array $ids) : array
 {
     return $this->repository->findByIds($ids);
 }