You are here

function theme_migrate_ui_field_mapping_dependencies in Migrate 7.2

Theme function to layout dependencies in a table.

Parameters

array $variables:

Return value

string Rendered markup.

1 theme call to theme_migrate_ui_field_mapping_dependencies()
migrate_ui_edit_mappings in migrate_ui/migrate_ui.pages.inc
Page callback to edit field mappings for a given migration.

File

migrate_ui/migrate_ui.pages.inc, line 1609
Pages for managing migration processes.

Code

function theme_migrate_ui_field_mapping_dependencies($variables) {
  $output = '';
  $form = $variables['dependencies'];
  $header = array(
    t('Migration'),
    t('Dependency'),
  );
  $rows = array();
  $elements = element_children($form);
  foreach ($elements as $mapping_key) {
    $row = array();
    $title = $form[$mapping_key]['#title'];
    unset($form[$mapping_key]['#title']);
    $row[] = $title;
    $row[] = drupal_render($form[$mapping_key]);
    $rows[] = $row;
  }
  $output .= theme('table', array(
    'rows' => $rows,
    'header' => $header,
    'empty' => t('No other migrations were found.'),
  ));
  $output .= drupal_render_children($form);
  return $output;
}