private function ChosenConfigForm::chosen_enabled_themes_options in Chosen 8.2
Same name and namespace in other branches
- 3.0.x src/Form/ChosenConfigForm.php \Drupal\chosen\Form\ChosenConfigForm::chosen_enabled_themes_options()
Helper function to get options for enabled themes.
1 call to ChosenConfigForm::chosen_enabled_themes_options()
- ChosenConfigForm::buildForm in src/
Form/ ChosenConfigForm.php - Chosen configuration form.
File
- src/
Form/ ChosenConfigForm.php, line 264
Class
- ChosenConfigForm
- Implements a ChosenConfig form.
Namespace
Drupal\chosen\FormCode
private function chosen_enabled_themes_options() {
$options = [];
// Get a list of available themes.
$themes = $this->themeHandler
->listInfo();
foreach ($themes as $theme_name => $theme) {
// Only create options for enabled themes.
if ($theme->status) {
if (!(isset($theme->info['hidden']) && $theme->info['hidden'])) {
$options[$theme_name] = $theme->info['name'];
}
}
}
return $options;
}