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