You are here

function backup_migrate_item::get_serialized_fields in Backup and Migrate 6.2

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

Return the fields which must be serialized before saving to the db.

File

includes/crud.inc, line 352
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, listed, edited, deleted etc.

Code

function get_serialized_fields() {
  $out = array();
  $schema = $this
    ->get_schema();
  foreach ($schema['fields'] as $field => $info) {
    if (!empty($info['serialize'])) {
      $out[] = $field;
    }
  }
  return $out;
}