You are here

function content_migrate_fields_node in Migrate Extras 6

Implementation of hook_migrate_fields_node().

1 call to content_migrate_fields_node()
content_profile_migrate_complete_user in ./content_profile.migrate.inc
Implementation of hook_migrate_complete_user().

File

./content.migrate.inc, line 35
Hooks for handling CCK fields on destination nodes

Code

function content_migrate_fields_node($type) {
  $types = (array) content_types();
  $fields = array();
  if (isset($types[$type])) {
    $content_type = $types[$type];
    foreach ($content_type['fields'] as $field) {

      // filefield has own implementation of hook_migrate_fields
      if ($field['type'] != 'filefield') {

        // Create a potential input field for each field column by creating a dummy name for each column.
        $db_info = content_database_info($field);
        foreach ($db_info['columns'] as $column => $info) {
          $fields[$field['field_name'] . '_' . $column] = t('CCK: ') . $field['widget']['label'] . ' ' . $column;
        }
      }
    }
  }
  return $fields;
}