You are here

function hook_content_migrate_field_alter in Content Construction Kit (CCK) 7.3

Implement this hook to alter the field definition of the migrated content.

Use this to tweak the conversion of field settings from the D6 style to the D7 style for specific situations not handled by basic conversion, as when field types or settings are changed.

Parameters

$field_value:

$instance_value:

4 functions implement hook_content_migrate_field_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

cck_content_migrate_field_alter in ./cck.module
Implements hook_content_migrate_field_alter().
file_content_migrate_field_alter in modules/content_migrate/modules/content_migrate.file.inc
Implements hook_content_migrate_field_alter().
number_content_migrate_field_alter in modules/content_migrate/modules/content_migrate.number.inc
Implements hook_content_migrate_field_alter().
text_content_migrate_field_alter in modules/content_migrate/modules/content_migrate.text.inc
Implements hook_content_migrate_field_alter().
1 invocation of hook_content_migrate_field_alter()
_content_migrate_get_field_values in modules/content_migrate/includes/content_migrate.values.inc
Create a D7-style field array from data stored in the D6 content field tables.

File

modules/content_migrate/content_migrate.api.php, line 18
Documentation for content migrate API.

Code

function hook_content_migrate_field_alter(&$field_value, $instance_value) {
  switch ($instance_value['widget']['module']) {
    case 'filefield':

      // Module names and types changed.
      $field_value['module'] = 'file';
      $field_value['type'] = 'file';
      break;
  }
}