Пример #1
0
 /**
  * Clear all remote image caches
  */
 public function deleteRemoteImageCaches()
 {
     IOHelper::clearFolder(craft()->path->getRuntimePath() . 'imager/');
 }
Пример #2
0
 /**
  * Remove transforms for a given asset 
  * 
  * @param AssetFileModel $asset
  */
 public function removeTransformsForAsset(AssetFileModel $asset)
 {
     $paths = new Imager_ImagePathsModel($asset);
     if (strpos($paths->targetPath, craft()->imager->getSetting('imagerSystemPath')) !== false) {
         IOHelper::clearFolder($paths->targetPath);
         craft()->templateCache->deleteCachesByElementId($asset->id);
     }
 }