You are here

function theme_migrate_content_set_mappings in Migrate 6

Theme function for content set edit page.

1 string reference to 'theme_migrate_content_set_mappings'
migrate_theme in ./migrate.module
Implementation of hook_theme().

File

./migrate_pages.inc, line 670

Code

function theme_migrate_content_set_mappings($form) {
  $output = drupal_render($form['machine_name']);
  $output .= drupal_render($form['description']);
  $output .= drupal_render($form['show_view_name']);
  $output .= drupal_render($form['view_args']);
  $output .= drupal_render($form['show_contenttype']);
  $output .= drupal_render($form['desttype']);
  $output .= drupal_render($form['sourcekey']);
  $output .= drupal_render($form['weight']);
  $output .= drupal_render($form['multiple_separator']);
  if (isset($form['destfield']) && is_array($form['destfield'])) {
    foreach (element_children($form['destfield']) as $destfield) {
      $row = array();
      $row[] = drupal_render($form['srcfield'][$destfield]);
      $row[] = drupal_render($form['default_value'][$destfield]);
      $row[] = drupal_render($form['destfield'][$destfield]);
      $rows[] = $row;
    }
  }
  $header = $form['header']['#value'];
  if (!$rows) {
    $rows[] = array(
      array(
        'data' => t('No data in the table.'),
        'colspan' => count($header),
      ),
    );
  }
  $output .= t('Map fields in the Source recordset to properties in a Drupal object. More complex fields such as multiple value elements need to be handled in code using the prepare hook.');
  $output .= theme('table', $header, $rows);
  $output .= drupal_render($form['submit']);
  $output .= drupal_render($form);

  // Support dynamic visualization of already-picked fields

  //drupal_add_js(drupal_get_path('module', 'migrate') .'/migrate.js');
  return $output;
}