You are here

public function SourcePluginBase::alterBackupMigrate in Backup and Migrate 5.0.x

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 WrapperPluginBase::alterBackupMigrate

See also

hook_backup_migrate_service_object_alter()

3 methods override SourcePluginBase::alterBackupMigrate()
DefaultDBSourcePlugin::alterBackupMigrate in src/Plugin/BackupMigrateSource/DefaultDBSourcePlugin.php
Alter the backup_migrate object to add the source and required services.
DrupalFilesSourcePlugin::alterBackupMigrate in src/Plugin/BackupMigrateSource/DrupalFilesSourcePlugin.php
Alter the backup_migrate object to add the source and required services.
EntireSiteSourcePlugin::alterBackupMigrate in src/Plugin/BackupMigrateSource/EntireSiteSourcePlugin.php
Alter the backup_migrate object to add the source and required services.

File

src/Drupal/EntityPlugins/SourcePluginBase.php, line 17

Class

SourcePluginBase
@package Drupal\backup_migrate\Drupal\EntityPlugins

Namespace

Drupal\backup_migrate\Drupal\EntityPlugins

Code

public function alterBackupMigrate(BackupMigrateInterface $bam, $key, array $options = []) {
  $bam
    ->sources()
    ->add($key, $this
    ->getObject());
}