Exemplo n.º 1
0
 /**
  * Steps necessary to store an image
  *
  * @param PurchasableInterface $purchasable Purchasable
  * @param string               $imageName   Image name
  *
  * @return $this Self object
  */
 protected function storePurchasableImage(PurchasableInterface $purchasable, $imageName)
 {
     $imagePath = realpath(__DIR__ . '/../images/' . $imageName);
     $image = $this->storeImage($imagePath);
     $purchasable->addImage($image);
     $purchasable->setPrincipalImage($image);
     return $this;
 }