You are here

public function backup_migrate_profile::__construct in Backup and Migrate 7.3

Perform a shallow merge of the defaults and the parameters.

This is needed because otherwise it will *combine* the nested arrays and make it impossible to deselect database tables from the 'nodata' setting.

Parameters

array $params:

Overrides backup_migrate_item::__construct

File

includes/profiles.inc, line 231

Class

backup_migrate_profile
A profile class for crud operations.

Code

public function __construct(array $params = array()) {
  $params = (array) $params;
  $defaults = (array) $this
    ->get_default_values();
  foreach ($defaults as $key => $val) {
    if (!isset($params[$key])) {
      $params[$key] = $val;
    }
  }
  $this
    ->from_array($params);
}