示例#1
0
 public function removeImage(Image $img)
 {
     //$img->clearCache();
     $storePath = $this->getModule()->getStorePath();
     $fileToRemove = $storePath . DIRECTORY_SEPARATOR . $img->filePath;
     if (preg_match('@\\.@', $fileToRemove) and is_file($fileToRemove)) {
         unlink($fileToRemove);
     }
     $img->delete();
 }