src/Offer/Offer.php
public function addImage(Image $image)
    {
        // Find the image based on UUID inside the internal state.
        $existingImage = $this->images->findImageByUUID($image->getMediaObjectId());

        if ($existingImage === null) {
            $this->apply(
                $this->createImageAddedEvent($image)
            );
        }
    }
public function addImage(Image $image)
    {
        // Find the image based on UUID inside the internal state.
        $existingImage = $this->images->findImageByUUID($image->getMediaObjectId());

        if ($existingImage === null) {
            $this->apply(
                $this->createImageAddedEvent($image)
            );
        }
    }
public function addImage ( Image $ image ) { // Find the image based on UUID inside the internal state. $ existingImage = $ this -> images -> findImageByUUID ( $ image -> getMediaObjectId ( ) ) ; if ( $ existingImage === null ) { $ this -> apply ( $ this -> createImageAddedEvent ( $ image ) ) ; } }
Add a new image.

@param Image $image
Add a new image .