コード例 #1
0
 public function delete(Photo $photo)
 {
     if (isset($this->photos[$photo->getId()])) {
         unset($this->photos[$photo->getId()]);
     } elseif (isset($this->hiddenPhotos[$photo->getId()])) {
         unset($this->hiddenPhotos[$photo->getId()]);
     }
 }
コード例 #2
0
 public function removePhoto(Contracts\Photo $photo)
 {
     if (array_key_exists($photo->getId(), $this->photos)) {
         unset($this->photos[$photo->getId()]);
     }
 }