function flag_views_flag_config_form in Flag 6
Same name and namespace in other branches
- 6.2 includes/flag.views.inc \flag_views_flag_config_form()
- 7.3 includes/views/flag.views.inc \flag_views_flag_config_form()
- 7.2 includes/flag.views.inc \flag_views_flag_config_form()
A helper function that creates a radio list of available flags.
This function is used to select the desired flag when setting up flag relationships and fields.
3 calls to flag_views_flag_config_form()
File
- includes/
flag.views.inc, line 225 - Provides support for the Views module.
Code
function flag_views_flag_config_form($form_type, $content_type, $current_flag) {
$flags = flag_get_flags($content_type);
$options = array();
foreach ($flags as $flag) {
$options[$flag->name] = $flag
->get_title();
}
$form = array(
'#type' => $form_type,
'#title' => t('Flag'),
'#options' => $options,
'#default_value' => $current_flag,
'#required' => TRUE,
);
return $form;
}