private function AmpSettingsForm::getThemeOptions in Accelerated Mobile Pages (AMP) 8.3
Same name and namespace in other branches
- 8 src/Form/AmpSettingsForm.php \Drupal\amp\Form\AmpSettingsForm::getThemeOptions()
- 8.2 src/Form/AmpSettingsForm.php \Drupal\amp\Form\AmpSettingsForm::getThemeOptions()
1 call to AmpSettingsForm::getThemeOptions()
- AmpSettingsForm::__construct in src/
Form/ AmpSettingsForm.php - Constructs a AmpSettingsForm object.
File
- src/
Form/ AmpSettingsForm.php, line 67
Class
- AmpSettingsForm
- Defines the configuration export form.
Namespace
Drupal\amp\FormCode
private function getThemeOptions() {
// Get all available themes.
$themes = $this->themeHandler
->rebuildThemeData();
uasort($themes, 'system_sort_modules_by_info_name');
$theme_options = [];
foreach ($themes as $theme) {
if (!empty($theme->info['hidden'])) {
continue;
}
elseif (!empty($theme->status)) {
$theme_options[$theme
->getName()] = $theme->info['name'];
}
}
return $theme_options;
}