You are here

public function backup_migrate_item::from_array in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/crud.inc \backup_migrate_item::from_array()
  2. 8.3 includes/crud.inc \backup_migrate_item::from_array()
  3. 6.3 includes/crud.inc \backup_migrate_item::from_array()
  4. 6.2 includes/crud.inc \backup_migrate_item::from_array()
  5. 7.2 includes/crud.inc \backup_migrate_item::from_array()

Load an existing item from an array.

4 calls to backup_migrate_item::from_array()
backup_migrate_item::edit_form_submit in includes/crud.inc
Submit the edit form for the item.
backup_migrate_item::load_row in includes/crud.inc
Load an existing item from an database (serialized) array.
backup_migrate_item::__construct in includes/crud.inc
Set the basic info pulled from the db or generated programatically.
backup_migrate_profile::__construct in includes/profiles.inc
Perform a shallow merge of the defaults and the parameters.

File

includes/crud.inc, line 484
CRUD functions for backup and migrate types (schedules, profiles etc.).

Class

backup_migrate_item
A base class for items which can be stored in the database.

Code

public function from_array($params) {
  foreach ($params as $key => $value) {
    if (method_exists($this, 'set_' . $key)) {
      $this
        ->{'set_' . $key}($value);
    }
    else {
      $this->{$key} = $value;
    }
  }
}