/**
  * {@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)));
 }
 /**
  * Get a select form item for the given list of sources
  *
  * @param \BackupMigrate\Core\Main\BackupMigrateInterface $bam
  * @param $title
  * @return array
  */
 public static function getSourceSelector(BackupMigrateInterface $bam, $title)
 {
     return DrupalConfigHelper::getPluginSelector($bam->sources(), $title);
 }
 /**
  * {@inheritdoc}
  */
 public function alterBackupMigrate(BackupMigrateInterface $bam, $key, $options = [])
 {
     $bam->sources()->add($key, $this->getObject());
 }