You are here

function _pmteam_migrate_field_data in Drupal PM (Project Management) 7.2

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

Helper function to migrate single node, given any pmteam row.

See also

pmperson_migrate_field_data()

1 call to _pmteam_migrate_field_data()
pmteam_migrate_field_data in pmteam/includes/pmteam.migrate.inc
Migrate pmteam node fields data to drupal user bundle.

File

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

Code

function _pmteam_migrate_field_data($pmteam) {
  $member_ids = array();
  try {
    $results = db_select('pmteam', 'pt')
      ->fields('pt')
      ->condition('vid', $pmteam->vid)
      ->execute();
    foreach ($results as $pt) {
      $member_ids[] = $pt->mnid;
    }
    if (!empty($member_ids)) {
      _pmteam_migrate_migrate_single_node($pmteam->nid, $pmteam->vid, $member_ids);
    }
  } catch (Exception $exc) {
    watchdog('pmteam', 'See ' . __FUNCTION__ . '() ' . $exc
      ->getTraceAsString(), NULL, WATCHDOG_ERROR);
  }
}