You are here

function relation_rules_get_endpoints in Relation 7

Same name and namespace in other branches
  1. 8.2 relation.rules.inc \relation_rules_get_endpoints()
  2. 8 relation.rules.inc \relation_rules_get_endpoints()

Endpoint property getter callback.

1 string reference to 'relation_rules_get_endpoints'
relation_entity_property_info in ./relation.module
Implements hook_entity_property_info().

File

./relation.rules.inc, line 111
Implements the Rules module API for Relation.

Code

function relation_rules_get_endpoints($relation, array $options, $property_name, $entity_type) {
  $array = array();
  foreach (relation_get_endpoints($relation) as $entity_type => $entities) {
    foreach ($entities as $entity) {
      $array[] = entity_metadata_wrapper($entity_type, $entity);
    }
  }
  return $array;
}