function theme_data_search_admin_form in Data 8
Same name and namespace in other branches
- 6 data_search/data_search.admin.inc \theme_data_search_admin_form()
- 7 data_search/data_search.admin.inc \theme_data_search_admin_form()
Theme data_search_admin_form.
File
- data_search/
data_search.admin.inc, line 63
Code
function theme_data_search_admin_form($variables) {
$form = $variables['form'];
$render_service = \Drupal::service('renderer');
// Format existing fields.
$rows = array();
foreach (element_children($form['fields']) as $e) {
$row = array();
foreach (element_children($form['fields'][$e]) as $f) {
$row[] = $render_service
->render($form['fields'][$e][$f]);
}
$rows[] = $row;
}
$header = array(
t('Name'),
t('Search index'),
);
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= $render_service
->render($form);
return $output;
}