You are here

function _services_entityreference_relationship_query in Services Entity API 7.2

Perform a relationship query

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

File

modules/services_entityreference/services_entityreference.module, line 201

Code

function _services_entityreference_relationship_query($entity_type, $field_name, $target_id, $fields, $parameters, $page, $pagesize, $sort, $direction) {
  $parameters[$field_name] = $target_id;
  $resourceclass = variable_get('services_entity_resource_class', 'ServicesEntityResourceController');
  $resource = new $resourceclass();
  return $resource
    ->index($entity_type, $fields, $parameters, $page, $pagesize, $sort, $direction);
}