Esempio n. 1
0
 /**
  * @return string
  */
 public function execute()
 {
     $photo = new Photo();
     $photo->setTags($this->photoDTO->getTags());
     $photo->setThumbnails($this->photoDTO->getUrls());
     return $this->repository->store($photo);
 }
Esempio n. 2
0
 /**
  * TODO: consider refactor
  * @return Photo
  */
 protected function addRandomPhoto()
 {
     $tags = [['name' => '   tag'], ['name' => 'tag '], ['name' => ' tag   '], ['name' => 'tag']];
     $data = ['name' => uniqid('name'), 'url' => uniqid('url'), 'tags' => $tags, 'gallery' => ['name' => ' Gallery: Gallery1  ']];
     $photo = new Photo($data);
     $photoId = $this->repository->store($photo);
     $photo->setId($photoId);
     return $photo;
 }