/** * {@inheritDoc} */ public function setName($name) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name)); return parent::setName($name); }
private function deleteImages(ImageEntity $entity) { if ($image = $entity->getImage()) { FileUtilService::deleteFile(FileUtilService::getFilePath($image, 'gallery', 'public/images')); foreach (ImageEntity::$thumbnailVariations as $key => $variation) { $variationImg = $entity->getImage($key); FileUtilService::deleteFile(FileUtilService::getFilePath($variationImg, 'gallery', 'public/images')); } } }