function hook_content_migrate_instance_alter in Content Construction Kit (CCK) 7.3
Implements this hook to alter the instance definition of the migrated content.
Use this to tweak the conversion of instance or widget settings from the D6 style to the D7 style for specific situations not handled by basic conversion, as when formatter or widget names or settings are changed.
Parameters
$instance_value:
$field_value:
5 functions implement hook_content_migrate_instance_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_instance_alter in ./
cck.module - Implements hook_content_migrate_instance_alter().
- file_content_migrate_instance_alter in modules/
content_migrate/ modules/ content_migrate.file.inc - Implements hook_content_migrate_instance_alter().
- number_content_migrate_instance_alter in modules/
content_migrate/ modules/ content_migrate.number.inc - Implements hook_content_migrate_instance_alter().
- options_content_migrate_instance_alter in modules/
content_migrate/ modules/ content_migrate.options.inc - Implements hook_content_migrate_instance_alter().
- text_content_migrate_instance_alter in modules/
content_migrate/ modules/ content_migrate.text.inc - Implements hook_content_migrate_instance_alter().
1 invocation of hook_content_migrate_instance_alter()
- _content_migrate_get_instance_values in modules/
content_migrate/ includes/ content_migrate.values.inc - Create a D7-style instance array from data stored in the D6 content field tables.
File
- modules/
content_migrate/ content_migrate.api.php, line 38 - Documentation for content migrate API.
Code
function hook_content_migrate_instance_alter(&$instance_value, $field_value) {
switch ($instance_value['widget']['module']) {
case 'text':
// The formatter names changed, all are prefixed with 'text_'.
foreach ($instance_value['display'] as $context => $settings) {
$instance_value['display'][$context]['type'] = 'text_' . $settings['type'];
}
break;
}
}