Exemplo n.º 1
0
 public function removeImage(Image $image)
 {
     $result = $this->images->removeElement($image);
     if ($this->getDefaultImage() === $image->getPath()) {
         if (!$this->images->isEmpty()) {
             $this->setDefaultImage($this->images->first()->getPath());
         } else {
             $this->setDefaultImage(null);
         }
     }
     return $result;
 }
 /**
  * Remove image
  *
  * @param \AppBundle\Entity\Image $image
  */
 public function removeImage(\AppBundle\Entity\Image $image)
 {
     $this->images->removeElement($image);
 }
Exemplo n.º 3
0
 /**
  * Remove images
  *
  * @param \Ifportal\DatabaseBundle\Entity\Image $images
  */
 public function removeImage(\Ifportal\DatabaseBundle\Entity\Image $images)
 {
     $this->images->removeElement($images);
 }