function flag_flag_is_flagged_access_settings in Flag 7.3
Settings form.
1 string reference to 'flag_flag_is_flagged_access_settings'
- flag_is_flagged.inc in plugins/
access/ flag_is_flagged/ flag_is_flagged.inc
File
- plugins/
access/ flag_is_flagged/ flag_is_flagged.inc, line 48
Code
function flag_flag_is_flagged_access_settings(&$form, &$form_state, $conf) {
$flag_name_options = array();
$plugin = $form_state['plugin'];
$entity_type = explode(':', $plugin['name']);
$entity_type = $entity_type[1];
foreach (flag_get_flags($entity_type) as $flag) {
$flag_name_options[$flag->name] = check_plain($flag->title);
}
$flag_user_options = array(
'any' => t('Flagged by anyone'),
'user' => t('Flagged by current user'),
);
$flag_user_default = isset($conf['flag_user']) ? $conf['flag_user'] : 'user';
$form['settings']['flag_name'] = array(
'#title' => t('Flag name'),
'#type' => 'radios',
'#options' => $flag_name_options,
'#description' => t('Include only flagged content.'),
'#default_value' => $conf['flag_name'],
);
$form['settings']['flag_user'] = array(
'#title' => t('Filter by flag owner'),
'#type' => 'radios',
'#options' => $flag_user_options,
'#description' => t('Show content flagged by anyone or only by current user.'),
'#default_value' => $flag_user_default,
);
return $form;
}