function theme_flag_rules_radios in Flag 6
Same name and namespace in other branches
- 6.2 includes/flag.rules_forms.inc \theme_flag_rules_radios()
1 theme call to theme_flag_rules_radios()
- flag_rules_data_type::get_default_input_form in includes/
flag.rules.inc - Returns radios for selecting a flag of the type given in $info['flag_type'].
File
- includes/
flag.rules_forms.inc, line 98 - flag.rules_form.inc Rules integration for the Flag module.
Code
function theme_flag_rules_radios($element) {
if (!empty($element['#disabled'])) {
drupal_set_message($element['#description'], 'error');
}
$headers = array(
t('Flag:'),
t('The flag type'),
t('Is the flag global?'),
);
$rows = array();
foreach (element_children($element) as $flag_name) {
$flag = flag_get_flag($flag_name);
$rows[] = array(
'<div class="flag-radio">' . drupal_render($element[$flag_name]) . '</div>',
$flag->content_type,
$flag->global ? t('Yes') : t('No'),
);
}
return theme('table', $headers, $rows);
}