function theme_salesforce_api_fieldmap_edit_form_table in Salesforce Suite 5.2
Same name and namespace in other branches
- 6.2 salesforce_api/salesforce_api.admin.inc \theme_salesforce_api_fieldmap_edit_form_table()
- 7 salesforce_api/salesforce_api.admin.inc \theme_salesforce_api_fieldmap_edit_form_table()
- 7.2 salesforce_api/salesforce_api.admin.inc \theme_salesforce_api_fieldmap_edit_form_table()
1 theme call to theme_salesforce_api_fieldmap_edit_form_table()
- salesforce_api_fieldmap_edit_form in salesforce_api/
salesforce_api.admin.inc
File
- salesforce_api/
salesforce_api.admin.inc, line 343 - Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.
Code
function theme_salesforce_api_fieldmap_edit_form_table($form) {
// Build the header array.
$header = array();
foreach (element_children($form['header']) as $element) {
$header[] = drupal_render($form['header'][$element]);
}
// Build the rows array.
$rows = array();
foreach (element_children($form['rows']) as $element) {
$rows[] = array(
drupal_render($form['rows'][$element]['target']),
array(
'data' => drupal_render($form['rows'][$element]['source']),
'class' => 'source-cell',
),
);
}
// Add a message if no rows were found.
if (empty($rows)) {
$rows[] = array(
array(
'data' => t('There are no fields of this type to set.'),
'colspan' => 2,
),
);
}
// Build the attributes array.
$attributes = array();
// Build the caption.
$caption = NULL;
if (isset($form['caption'])) {
$caption = drupal_render($form['caption']);
}
return theme('table', $header, $rows, $attributes, $caption);
}