public function DrupalUtils::configSchema in Backup and Migrate 5.0.x
Get a default (blank) schema.
Parameters
array $params: The parameters including:
- operation - The operation being performed, will be one of:
- 'backup': Configuration needed during a backup operation
- 'restore': Configuration needed during a restore
- 'initialize': Core configuration always needed by this item.
Return value
array
Overrides ConfigurableTrait::configSchema
File
- src/
Drupal/ Filter/ DrupalUtils.php, line 26
Class
- DrupalUtils
- @package Drupal\backup_migrate\Drupal\Filter
Namespace
Drupal\backup_migrate\Drupal\FilterCode
public function configSchema(array $params = []) {
$schema = [];
// Backup configuration.
if ($params['operation'] == 'backup' || $params['operation'] == 'restore') {
$schema['groups']['advanced'] = [
'title' => 'Advanced Settings',
];
$schema['fields']['site_offline'] = [
'group' => 'advanced',
'type' => 'boolean',
'title' => $this
->t('Take site offline'),
'description' => $this
->t('Take the site offline during backup and show a maintenance message. Site will be taken back online once the backup is complete.'),
];
}
return $schema;
}