You are here

function _flag_rules_flags_options in Flag 7.2

Same name and namespace in other branches
  1. 6.2 includes/flag.rules_forms.inc \_flag_rules_flags_options()
  2. 6 includes/flag.rules_forms.inc \_flag_rules_flags_options()
  3. 7.3 flag.rules.inc \_flag_rules_flags_options()
1 call to _flag_rules_flags_options()
FlagRulesUIClass::inputForm in ./flag.rules.inc
Constructs the direct input form.

File

./flag.rules.inc, line 98
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] = array(
        'title' => $flag
          ->get_title(),
        'type' => $flag->content_type,
        'global' => $flag->global ? t('Yes') : t('No'),
      );
    }
  }
  return $options;
}