private function installExportTypes()
{
$exportTypes = ExportTypePluginHelper::getExportTypePlugins("installationDatabaseReady", false);
$hasError = false;
$results = array();
$count = 0;
$folders = array();
foreach ($exportTypes as $currExportType) {
try {
list($success, $content) = $currExportType->install();
if (!$success) {
$hasError = true;
break;
}
$folder = $currExportType->getFolder();
$results[] = array("name" => $currExportType->getName(), "folder" => $folder);
$folders[] = $folder;
$count++;
} catch (Exception $e) {
$hasError = true;
break;
}
}
// need error handling here
Settings::setSetting("installedExportTypes", implode(",", $folders));
$this->response["success"] = !$hasError;
$this->response["content"] = array("total" => $count, "results" => $results);
}