public function DatabaseSource::configSchema in Backup and Migrate 5.0.x
Get a definition for user-configurable settings.
Parameters
array $params:
Return value
array
Overrides ConfigurableTrait::configSchema
File
- src/
Core/ Source/ DatabaseSource.php, line 25
Class
- DatabaseSource
- @package Drupal\backup_migrate\Core\Source
Namespace
Drupal\backup_migrate\Core\SourceCode
public function configSchema(array $params = []) {
$schema = [];
// Init settings.
if ($params['operation'] == 'initialize') {
$schema['fields']['host'] = [
'type' => 'text',
'title' => 'Hostname',
];
$schema['fields']['database'] = [
'type' => 'text',
'title' => 'Database',
];
$schema['fields']['username'] = [
'type' => 'text',
'title' => 'Username',
];
$schema['fields']['password'] = [
'type' => 'password',
'title' => 'Password',
];
$schema['fields']['port'] = [
'type' => 'number',
'min' => 1,
'max' => 65535,
'title' => 'Port',
];
}
return $schema;
}