/**
  * {@inheritdoc}
  */
 public function alterBackupMigrate(BackupMigrateInterface $bam, $key, $options = [])
 {
     if ($source = $this->getObject()) {
         $bam->sources()->add($key, $source);
         $config = ['exclude_tables' => [], 'nodata_tables' => []];
         // @TODO: Allow modules to add their own excluded tables.
         $bam->plugins()->add('db_exclude', new DBExcludeFilter(new Config($config)));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function alterBackupMigrate(BackupMigrateInterface $bam, $key, $options = [])
 {
     $source = $this->getObject();
     $bam->sources()->add($key, $source);
     $config = ['exclude_filepaths' => [], 'source' => $source];
     switch ($this->getConfig()->get('directory')) {
         case 'public://':
             $config['exclude_filepaths'] = ['js', 'css', 'php', 'styles', 'config_*', '.htaccess'];
             break;
         case 'private://':
             $config['exclude_filepaths'] = ['backup_migrate'];
             break;
     }
     // @TODO: Allow modules to add their own excluded defaults.
     $bam->plugins()->add($key . '_exclude', new FileExcludeFilter(new Config($config)));
 }