thrownew\InvalidArgumentException("The argument \$action must be either ".get_class($this)."::ACTION_UNLINK or ".get_class($this)."::ACTION_REGENERATE");
}
$style_paths=$this->getStylePaths($path);
foreach($style_pathsas$style_path){
foreach($style_pathsas$style_id=>$style_path){
$this->fileSystem->unlink($style_path);
if($action==self::ACTION_UNLINK){
$this->fileSystem->unlink($style_path);
}
elseif($action==self::ACTION_REGENERATE){
$imageStyle=ImageStyle::load($style_id);
$imageStyle->createDerivative($path,$style_path);
}
}
return$style_paths;
}
@@ -52,17 +68,18 @@ class FlushSingleImage implements FlushSingleImageInterface {