function flag_properties_get_flagging_boolean in Flag 7.3
Getter callback that returns whether the given entity is flagged.
1 string reference to 'flag_properties_get_flagging_boolean'
- flag_entity_property_info_alter in ./
flag.info.inc - Implements hook_entity_property_info_alter().
File
- ./
flag.module, line 2624 - The Flag module.
Code
function flag_properties_get_flagging_boolean($entity, array $options, $name, $entity_type, $property_info) {
list($entity_id, ) = entity_extract_ids($entity_type, $entity);
$flagging_data = flag_get_user_flags($entity_type, $entity_id);
return isset($flagging_data[$property_info['flag_name']]);
}