You are here

public function DestinationPluginBase::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()

File

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

Class

DestinationPluginBase
@package Drupal\backup_migrate\Drupal\EntityPlugins

Namespace

Drupal\backup_migrate\Drupal\EntityPlugins

Code

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