function flag_views_flag_config_form in Flag 7.3
Same name and namespace in other branches
- 6.2 includes/flag.views.inc \flag_views_flag_config_form()
- 6 includes/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()
- flag_handler_relationship_content::options_form in includes/
views/ flag_handler_relationships.inc - Provide the label widget that all fields should have.
- flag_handler_relationship_counts::options_form in includes/
views/ flag_handler_relationships.inc - Provide the label widget that all fields should have.
- flag_handler_relationship_user_content::options_form in includes/
views/ flag_handler_relationships.inc - Provide the label widget that all fields should have.
File
- includes/
views/ flag.views.inc, line 280 - Provides support for the Views module.
Code
function flag_views_flag_config_form($form_type, $entity_type, $current_flag) {
$flags = flag_get_flags($entity_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;
}