public function getDefaultExportType() { $defaultExportType = Core::getDefaultExportType(); $exportTypes = $this->getExportTypePlugins(); // if the default export type isn't selected for this particular user, select the first in the list. Assumption // if that there's always at least one Export Type $found = false; foreach ($exportTypes as $exportType) { $exportTypeClass = get_class($exportType); if ($exportTypeClass == $defaultExportType) { $found = true; break; } } if (!$found) { $defaultExportType = get_class($exportTypes[0]); } return $defaultExportType; }