/** * Removes image thumbnails for given preset. * * @param string $imagePath Source image path * @param string $objectId Object identifier (for example ID) * * @return SystemPlugin_Imagine_Manager */ public function removePresetThumbs($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(), $image->getThumbNamePattern(), true); return $this; }