function relation_rules_get_specific_endpoints in Relation 7
Same name and namespace in other branches
- 8.2 relation.rules.inc \relation_rules_get_specific_endpoints()
 - 8 relation.rules.inc \relation_rules_get_specific_endpoints()
 
Entity-type specific property getter callback.
1 string reference to 'relation_rules_get_specific_endpoints'
- relation_entity_property_info_alter in ./
relation.module  - Implements hook_entity_property_info_alter().
 
File
- ./
relation.rules.inc, line 124  - Implements the Rules module API for Relation.
 
Code
function relation_rules_get_specific_endpoints($relation, array $options, $property_name, $entity_type, $info) {
  $endpoints = relation_get_endpoints_by_endpoint_type($relation, $info['endpoint_type']);
  $array = array();
  foreach ($endpoints as $endpoint) {
    $entities = entity_load($endpoint['entity_type'], array(
      $endpoint['entity_id'],
    ));
    $entity_id = entity_extract_ids($endpoint['entity_type'], reset($entities));
    $array[] = $entity_id[0];
  }
  return $array;
}