You are here

function backup_migrate_profile::set_source in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.2 includes/profiles.inc \backup_migrate_profile::set_source()
  2. 8.3 includes/profiles.inc \backup_migrate_profile::set_source()
  3. 6.3 includes/profiles.inc \backup_migrate_profile::set_source()
  4. 6.2 includes/profiles.inc \backup_migrate_profile::set_source()
  5. 7.3 includes/profiles.inc \backup_migrate_profile::set_source()

Set the source of this setings profile. Takes either a source object or source id.

File

includes/profiles.inc, line 246

Class

backup_migrate_profile
A profile class for crud operations.

Code

function set_source($source) {
  if (is_object($source)) {
    $this->source = $source;
    $this->source_id = $source
      ->get_id();
  }
  else {
    $this->source_id = $source;
    unset($this->source);
  }
}