public static function delete($id, $type)
{
if ($type == "plugin") {
$pluginDir = PIMCORE_PLUGINS_PATH . "/" . $id;
if (is_writeable($pluginDir)) {
recursiveDelete($pluginDir, true);
}
} elseif ($type == "brick") {
$brickDirs = self::getBrickDirectories();
$brickDir = $brickDirs[$id];
if (is_writeable($brickDir)) {
recursiveDelete($brickDir, true);
}
}
}