Exemplo n.º 1
0
 /**
  * Removes all thumbnails for given image.
  *
  * @param string    $imagePath  Source image path
  * @param string    $objectId   Object identifier (for example ID)
  *
  * @return SystemPlugin_Imagine_Manager
  */
 public function removeImageThumbs($imagePath, $objectId = null)
 {
     if (!is_string($objectId)) {
         $objectId = $this->getObjectId($imagePath);
     }
     $thumbDir = $this->getFullThumbDir($objectId, basename($imagePath));
     $preset = $this->getPreset();
     $image = new SystemPlugin_Imagine_Image($imagePath, $thumbDir, $preset->getName(), $preset['extension']);
     $this->removeFiles($image->getThumbPath(), false, true);
     return $this;
 }