You are here

public function DBExcludeFilter::beforeDBTableBackup in Backup and Migrate 8.4

The 'beforeDBTableBackup' plugin op.

Parameters

array $table:

array $params:

Return value

array $table

File

lib/backup_migrate_core/src/Filter/DBExcludeFilter.php, line 32

Class

DBExcludeFilter
Allows the exclusion of certain data from a database.

Namespace

BackupMigrate\Core\Filter

Code

public function beforeDBTableBackup($table, $params = []) {
  $exclude = $this
    ->confGet('exclude_tables');
  $nodata = $this
    ->confGet('nodata_tables');
  if (in_array($table['name'], $exclude)) {
    $table['exclude'] = TRUE;
  }
  if (in_array($table['name'], $nodata)) {
    $table['nodata'] = TRUE;
  }
  return $table;
}