You are here

function _services_entityreference_relationship_query_forward in Services Entity API 7.2

Retrieve entities in an entityreference field.

Parameters

$entity_type: The entity type.

$entity_id: The id of the entity on which the field values are present.

$field_name: The name of the entityreference field.

$fields: A comma-separated list of the fields to return on the returned entities, or '*' to return all fields.

Return value

An array of entity data.

1 string reference to '_services_entityreference_relationship_query_forward'
services_entityreference_services_resources in modules/services_entityreference/services_entityreference.module
Implements hook_services_resources_alter()

File

modules/services_entityreference/services_entityreference.module, line 224

Code

function _services_entityreference_relationship_query_forward($entity_type, $entity_id, $field_name, $fields) {
  $resourceclass = variable_get('services_entity_resource_class', 'ServicesEntityResourceController');
  $resource = new $resourceclass();
  return $resource
    ->field($entity_type, $entity_id, $field_name, $fields);
}