You are here

function _drush_entityreference_migration_references_field in Reference to EntityReference Field Migration 7

Same name and namespace in other branches
  1. 7.2 entityreference_migration.drush.inc \_drush_entityreference_migration_references_field()
1 string reference to '_drush_entityreference_migration_references_field'
drush_entityreference_migration_references in ./entityreference_migration.drush.inc
Convert the references fields to entityreference.

File

./entityreference_migration.drush.inc, line 81

Code

function _drush_entityreference_migration_references_field($field_key, $field_info, &$context) {
  drush_print(dt("Processing @field_name", array(
    '@field_name' => $field_info['field_name'],
  )));
  if (!in_array($field_info['type'], array(
    'node_reference',
    'user_reference',
  ))) {
    drush_set_error(dt("Field @field is not a references field.", array(
      '@field' => $field_name,
    )));
  }
  else {
    _entityreference_migration_references_field_to_entityreference_field($field_key, $field_info, $context);
    drush_print(dt("Processed @field_name", array(
      '@field_name' => $field_info['field_name'],
    )));
  }
}