You are here

function flag_rules_action_fetch_entity_flag_count in Flag 7.3

Base action implementation: Fetch count of flags for a particular entity type.

During a flagging, the current flagging will be included in the count. During an unflagging, the current flagging being removed will not yet have been removed from the count.

1 string reference to 'flag_rules_action_fetch_entity_flag_count'
flag_rules_action_info in ./flag.rules.inc
Implements hook_rules_action_info().

File

./flag.rules.inc, line 484
Rules integration for the Flag module.

Code

function flag_rules_action_fetch_entity_flag_count($flag, $entity_type) {
  $count = flag_get_entity_flag_counts($flag, $entity_type);
  return array(
    'entity_flag_count' => $count,
  );
}