src/Offer/OfferCommandHandler.php
public function handleAddImage(AbstractAddImage $addImage)
    {
        $offer = $this->load($addImage->getItemId());

        $image = $this->mediaManager->getImage($addImage->getImageId());
        $offer->addImage($image);

        $this->offerRepository->save($offer);
    }
public function handleAddImage(AbstractAddImage $addImage)
    {
        $offer = $this->load($addImage->getItemId());

        $image = $this->mediaManager->getImage($addImage->getImageId());
        $offer->addImage($image);

        $this->offerRepository->save($offer);
    }
public function handleAddImage ( AbstractAddImage $ addImage ) { $ offer = $ this -> load ( $ addImage -> getItemId ( ) ) ; $ image = $ this -> mediaManager -> getImage ( $ addImage -> getImageId ( ) ) ; $ offer -> addImage ( $ image ) ; $ this -> offerRepository -> save ( $ offer ) ; }
Handle an add image command.
@param AbstractAddImage $addImage
Handle an add image command .