You are here

function _services_entity_access_callback in Services Entity API 7.2

Services access callback.

Invokes the 'access' method of the appropriate controller.

Parameters

$access_op: The $op value to pass as the first parameter to the controller's access() method.

array $args: An array of arguments that will be passed to the resource callback. This is due to our setting of 'access arguments append' in the resource info.

Return value

boolean TRUE to grant access, FALSE otherwise.

2 string references to '_services_entity_access_callback'
ServicesResourceControllerAbstract::getInfoElement in plugins/services_entity_abstract.inc
Helper function to return basic information about a resource operation.
services_entityreference_services_resources in modules/services_entityreference/services_entityreference.module
Implements hook_services_resources_alter()

File

./services_entity.resources.inc, line 22

Code

function _services_entity_access_callback($access_op, $args) {

  // Remove the first of the arguments, which is the resource method name.
  array_shift($args);
  $entity_type = reset($args);
  $controller = _services_entity_get_controller($entity_type);
  return call_user_func_array(array(
    $controller,
    'access',
  ), array(
    $access_op,
    $args,
  ));
}