You are here

function pmteam_migrate_field_data in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pmteam/includes/pmteam.migrate.inc \pmteam_migrate_field_data()
  2. 7.2 pmteam/includes/pmteam.migrate.inc \pmteam_migrate_field_data()

Migrate pmteam node fields data to drupal user bundle.

1 call to pmteam_migrate_field_data()
pmteam_migrate in pmteam/includes/pmteam.migrate.inc
Helper function for migrating between PMTeam to drupal fields.

File

pmteam/includes/pmteam.migrate.inc, line 68
Migration functions for the PM Team module.

Code

function pmteam_migrate_field_data(&$sandbox) {
  $results = db_select('pmteam', 'pt')
    ->fields('pt')
    ->condition('vid', $sandbox['pmteam_current_vid_of_field_being_migrated'], '>')
    ->groupBy('pt.vid')
    ->range(0, PMTEAM_MIGRATE_MAX_JOB_PER_BATCH)
    ->execute();
  $count = 0;
  foreach ($results as $pmteam) {
    $count++;
    $sandbox['pmteam_current_vid_of_field_being_migrated'] = $pmteam->vid;
    _pmteam_migrate_field_data($pmteam);
  }
  return empty($count);
}