You are here

public function MetadataWriter::setUp in Backup and Migrate 5.0.x

Run before the backup/restore begins.

File

src/Core/Filter/MetadataWriter.php, line 77

Class

MetadataWriter
Add metadata such as a description to the backup file.

Namespace

Drupal\backup_migrate\Core\Filter

Code

public function setUp($operand, $options) {
  if ($options['operation'] == 'backup' && $options['source_id']) {
    $this
      ->config()
      ->set('bam_sourceid', $options['source_id']);
    if ($source = $this
      ->plugins()
      ->get($options['source_id'])) {

      // @todo Query the source for it's type and name.
    }
  }
  return $operand;
}