function theme_botcha_forms_form_botcha_forms in BOTCHA Spam Prevention 7.2
Same name and namespace in other branches
- 6.2 botcha.admin.inc \theme_botcha_forms_form_botcha_forms()
- 6.3 botcha.module \theme_botcha_forms_form_botcha_forms()
- 7.3 botcha.module \theme_botcha_forms_form_botcha_forms()
Custom theme function for a table of (form_id -> BOTCHA type) settings
1 theme call to theme_botcha_forms_form_botcha_forms()
- Botcha::getAdminForm in controller/
botcha.controller.inc - Get admin form.
File
- ./
botcha.admin.inc, line 353 - Implementation of botcha administration forms.
Code
function theme_botcha_forms_form_botcha_forms($variables) {
$form = $variables['form'];
// Prepare header before pass to theme.
$header = $form['#header'];
$rows = array();
// Existing BOTCHA points.
foreach (element_children($form['botcha_forms']) as $id) {
$row = array();
foreach (element_children($form['botcha_forms'][$id]) as $col) {
$row[$col] = drupal_render($form['botcha_forms'][$id][$col]);
}
$rows[$id] = $row;
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
return $output;
}