public static function DrupalConfigHelper::getSettingsProfileSelector in Backup and Migrate 8.4
GEt a pulldown for the list of all settings profiles.
Parameters
$title:
Return value
array
2 calls to DrupalConfigHelper::getSettingsProfileSelector()
- BackupMigrateQuickBackupForm::buildForm in src/
Form/ BackupMigrateQuickBackupForm.php - Form constructor.
- ScheduleForm::form in src/
Form/ ScheduleForm.php - Gets the actual form array to be built.
File
- src/
Config/ DrupalConfigHelper.php, line 264
Class
- DrupalConfigHelper
- Class DrupalConfigHelper.
Namespace
BackupMigrate\Drupal\ConfigCode
public static function getSettingsProfileSelector($title, $default_value = NULL) {
$options = [];
foreach (SettingsProfile::loadMultiple() as $key => $profile) {
$options[$key] = $profile
->get('label');
}
if ($options) {
return [
'#type' => 'select',
'#title' => $title,
'#options' => $options,
'#default_value' => $default_value,
];
}
}