Account::getDefaultExportType PHP Method

getDefaultExportType() public method

With 3.2.2, users can now customize the plugins they want to use, so Core::getDefaultExportType() is no longer sufficient to figure out what tab should be selected in the UI on page load. This is now used instead.
    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;
    }