public function EntireSiteSourcePlugin::alterBackupMigrate in Backup and Migrate 5.0.x
Same name and namespace in other branches
- 8.4 src/Plugin/BackupMigrateSource/EntireSiteSourcePlugin.php \Drupal\backup_migrate\Plugin\BackupMigrateSource\EntireSiteSourcePlugin::alterBackupMigrate()
Alter the backup_migrate object to add the source and required services.
Parameters
\Drupal\backup_migrate\Core\Main\BackupMigrateInterface $bam: The BackupMigrate object to add plugins and services to.
string $key: The id of the source to add.
array $options: The alter options.
Return value
mixed
Overrides SourcePluginBase::alterBackupMigrate
See also
hook_backup_migrate_service_object_alter()
File
- src/
Plugin/ BackupMigrateSource/ EntireSiteSourcePlugin.php, line 48
Class
- EntireSiteSourcePlugin
- Defines an default database source plugin.
Namespace
Drupal\backup_migrate\Plugin\BackupMigrateSourceCode
public function alterBackupMigrate(BackupMigrateInterface $bam, $key, array $options = []) {
if ($source = $this
->getObject()) {
$bam
->sources()
->add($key, $source);
// @todo Enable this, fix it.
// $bam->sources()->add('default_db', $this->dbSource);
}
}