You are here

function relation_rules_get_endpoints in Relation 8

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

Endpoint property getter callback.

File

./relation.rules.inc, line 103
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;
}