/** * {@inheritDoc} */ public function getImage($type = NULL) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getImage', array($type)); return parent::getImage($type); }
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')); } } }