function phone_content_migrate_field_alter in Phone 7.2
Same name and namespace in other branches
- 7 phone.module \phone_content_migrate_field_alter()
Implements hook_content_migrate_field_alter().
Alter the field definition of D6 fields.
File
- ./
phone.content_migrate.inc, line 18 - Functions specifically to support the content_migrate package used within CCK to do Drupal6 to Drupal7 migration of fields.
Code
function phone_content_migrate_field_alter(&$field_value, $instance_value) {
// content_migrate takes care of creating new tables with current schema
if ($instance_value['widget']['module'] == 'phone') {
// No changes to field-level settings necessary for D6-phone migration.
}
elseif ($instance_value['widget']['module'] == 'cck_phone') {
// Update name of module for D6-cck_phone migration.
$field_value['messages'][] = t("Changed field type: The '@field' field type will be changed from '@type' to 'phone'.", array(
'@type' => $field_value['type'],
'@field' => $field_value['field_name'],
));
$field_value['module'] = 'phone';
$field_value['type'] = 'phone';
}
}