Exemple #1
0
 /**
  * Delete unit image
  *     
  * @param string $filename
  * @return boolean
  */
 public function deleteImageFiles($filename)
 {
     $extensionMediaFolder = $this->getFolder();
     $files = array();
     $files[] = $unitFolder . DIRECTORY_SEPARATOR . $filename;
     $files[] = $unitFolder . DIRECTORY_SEPARATOR . RM_Media_Image::get(RM_Media_Image::THUMB)->createFilename($filename);
     return RM_Filesystem::deleteFiles($files);
 }
Exemple #2
0
 /**
  * Delete image files from media manager by it's name
  *
  * @param string $filename filename
  * @return bool
  */
 public function deleteImageFiles($filename)
 {
     $files = array();
     $files[] = $this->_imageFolder . DIRECTORY_SEPARATOR . $filename;
     $files[] = $this->_imageFolder . DIRECTORY_SEPARATOR . RM_Media_Image::get(RM_Media_Image::ADMIN)->createFilename($filename);
     return RM_Filesystem::deleteFiles($files);
 }