src/Service/EntityManager/ImageManager.php
/**
     * Prepare the Image entity to receive a new file.
     *
     * @throws Exception From DateTime provided by GlobalClock and Uuid::uuid4
     */
Prepare the Image entity to receive a new file.
@throws Exception From DateTime provided by GlobalClock and Uuid::uuid4
Prepare the Image entity to receive a new file . @throws Exception From DateTime provided by GlobalClock and Uuid :: uuid4
public function prepare(Image $image): Image
    {
        if ($image->getCreatedAt()) {
            $image->setUpdatedAt($this->clock->getNowInDateTime());
            return $image;
        }
        $image->setUuid(Uuid::uuid4());
        $image->setCreatedAt($this->clock->getNowInDateTime());
        return $image;
    }
public function prepare ( Image $ image ) : Image { if ( $ image -> getCreatedAt ( ) ) { $ image -> setUpdatedAt ( $ this -> clock -> getNowInDateTime ( ) ) ; return $ image ; } $ image -> setUuid ( Uuid :: uuid4 ( ) ) ; $ image -> setCreatedAt ( $ this -> clock -> getNowInDateTime ( ) ) ; return $ image ; }
Prepare the Image entity to receive a new file.
Prepare the Image entity to receive a new file .