_services_access_value

  1. services
    1. 7.3
    2. 6.3
Versions
7.3 – 6.3 _services_access_value($data, $fields)

▾ 4 functions call _services_access_value()

_comment_resource_access in resources/comment_resource.inc
Access check callback for comment controllers.
_file_resource_access in resources/file_resource.inc
Access check callback for file controllers.
_node_resource_access in resources/node_resource.inc
Determine whether the current user can access a node resource.
_user_resource_access in resources/user_resource.inc
Access check callback for user resource.

Code

./services.runtime.inc, line 386

<?php
function _services_access_value($data, $fields) {

  if (!is_array($fields)) {
    $fields = array($fields);
  }

  foreach ($fields as $field) {
    if (is_array($data) && isset($data[$field]) && count($data) == 1) {
      return $data[$field];
    }
  }
  return $data;
}
?>