Пример #1
0
 /**
  * @param array $by
  * @return bool
  */
 public function delete(array $by)
 {
     $article = $this->find($by['idArticle'], $by['lang']);
     if (!$article) {
         throw new EntityExistsException('Tento článek neexistuje');
     }
     $this->imageMapper->delete(articleImagesPath . $article->image);
     return parent::delete($by);
 }
Пример #2
0
 /**
  * @param array $by
  * @return bool
  */
 public function delete(array $by)
 {
     $offer = $this->find($by['idOffer'], $by['lang']);
     if (!$offer) {
         throw new EntityExistsException('Tato nabídka neexistuje');
     }
     $this->imageMapper->delete(offerImagesPath . $offer->image);
     return parent::delete($by);
 }