public static function DrupalConfigHelper::buildAllPluginsForm in Backup and Migrate 8.4
Build the configuration form for all plugins in a manager.
Parameters
\BackupMigrate\Core\Plugin\PluginManagerInterface $plugins: The PluginManager containing all of the plugins to be configured.
string $operation: 'backup', 'restore', or 'initialize' depending on the operation being configured for.
array $parents: The form parents array.
Return value
array
4 calls to DrupalConfigHelper::buildAllPluginsForm()
- BackupMigrateAdvancedBackupForm::buildForm in src/
Form/ BackupMigrateAdvancedBackupForm.php - Form constructor.
- BackupMigrateRestoreForm::buildForm in src/
Form/ BackupMigrateRestoreForm.php - Form constructor.
- BackupRestoreForm::buildForm in src/
Form/ BackupRestoreForm.php - SettingsProfileForm::form in src/
Form/ SettingsProfileForm.php - Gets the actual form array to be built.
File
- src/
Config/ DrupalConfigHelper.php, line 30
Class
- DrupalConfigHelper
- Class DrupalConfigHelper.
Namespace
BackupMigrate\Drupal\ConfigCode
public static function buildAllPluginsForm(PluginManagerInterface $plugins, $operation, $parents = []) {
$form = [];
foreach ($plugins
->getAll() as $plugin_key => $plugin) {
$schema = $plugin
->configSchema([
'operation' => $operation,
]);
$config = $plugin
->config();
DrupalConfigHelper::addFieldsFromSchema($form, $schema, $config, array_merge($parents, [
$plugin_key,
]));
}
return $form;
}