You are here

function _flag_rules_flags_options in Flag 6.2

Same name and namespace in other branches
  1. 6 includes/flag.rules_forms.inc \_flag_rules_flags_options()
  2. 7.3 flag.rules.inc \_flag_rules_flags_options()
  3. 7.2 flag.rules.inc \_flag_rules_flags_options()
1 call to _flag_rules_flags_options()
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 117
Rules integration for the Flag module.

Code

function _flag_rules_flags_options($flag_type = NULL) {
  $flags = flag_get_flags();
  $options = array();
  foreach ($flags as $flag) {
    if (!isset($flag_type) || $flag->content_type == $flag_type) {
      $options[$flag->name] = $flag
        ->get_title();
    }
  }
  return $options;
}