You are here

function voting_rules_get_property in Voting Rules 7

Rules callback for user and entities.

1 string reference to 'voting_rules_get_property'
voting_rules_rules_data_info in ./voting_rules.rules.inc
Implements hook_rules_data_type_info().

File

./voting_rules.module, line 135
Voting Rules module.

Code

function voting_rules_get_property($data, array $options, $name, $entity_type) {
  switch ($name) {
    case 'user':
      return user_load($data['uid']);
    case 'entity':
      return voting_rules_load_entity($data['entity_type'], $data['entity_id']);
  }
}