You are here

function _flag_get_flag_names in Flag 7.3

Same name and namespace in other branches
  1. 5 flag.module \_flag_get_flag_names()
  2. 6.2 flag.module \_flag_get_flag_names()
  3. 6 flag.module \_flag_get_flag_names()
  4. 7.2 flag.module \_flag_get_flag_names()

Return an array of flag names keyed by fid.

3 calls to _flag_get_flag_names()
flag_comment::get_flagging_record in includes/flag/flag_comment.inc
Overrides flag_flag::get_flagging_record().
flag_get_entity_flags in ./flag.module
Return a list of users who have flagged an entity.
flag_get_user_flags in ./flag.module
Find what a user has flagged, either a single entity or on the entire site.

File

./flag.module, line 1668
The Flag module.

Code

function _flag_get_flag_names() {
  $flags = flag_get_flags();
  $flag_names = array();
  foreach ($flags as $flag) {
    $flag_names[$flag->fid] = $flag->name;
  }
  return $flag_names;
}