function flag_get_flagged_content in Flag 7.2
Same name and namespace in other branches
- 6.2 flag.module \flag_get_flagged_content()
Get all flagged content in a flag.
Parameters
The flag name for which to retrieve flagged content.:
File
- ./
flag.module, line 1811 - The Flag module.
Code
function flag_get_flagged_content($flag_name) {
$return = array();
$flag = flag_get_flag($flag_name);
$result = db_select('flag_content', 'fc')
->fields('fc')
->condition('fid', $flag->fid)
->execute();
foreach ($result as $row) {
$return[] = $row;
}
return $return;
}