function services_uuid_services_resources in Services Client 7
Same name and namespace in other branches
- 7.2 services_uuid/services_uuid.module \services_uuid_services_resources()
Implementation of hook_services_resources() Defines the UUID resource fo the services module
Return value
array
File
- services_uuid/
services_uuid.module, line 9
Code
function services_uuid_services_resources() {
$uuid_resource = array(
'uuid' => array(
'retrieve' => array(
'callback' => '_services_uuid_resource_retrieve',
'help' => t('Get the nid for a given UUID.'),
'args' => array(
array(
'name' => 'type',
'optional' => FALSE,
'source' => array(
'path' => 0,
),
'type' => 'string',
'description' => 'The data type for which to retrieve the UUID',
),
array(
'name' => 'uuid',
'optional' => FALSE,
'source' => array(
'param' => 'uuid',
),
'type' => 'string',
'description' => 'The uuid for which to get the object id (nid, uid, etc...)',
),
),
'access callback' => '_services_uuid_resource_access',
'access arguments' => array(
'view',
),
'access arguments append' => TRUE,
),
'update' => array(
'callback' => '_services_uuid_resource_update',
'args' => array(
array(
'name' => 'type',
'optional' => FALSE,
'source' => array(
'path' => 0,
),
'type' => 'string',
'description' => 'The data type for which to retrieve the UUID',
),
array(
'name' => 'uuid',
'optional' => FALSE,
'source' => array(
'data' => 'uuid',
),
'type' => 'string',
'description' => 'The uuid for which to get the object id (nid, uid, etc...)',
),
array(
'name' => 'id',
'optional' => FALSE,
'source' => array(
'data' => 'id',
),
'type' => 'string',
'description' => 'Resource ID',
),
),
'access callback' => '_services_uuid_resource_access',
'access arguments' => array(
'update',
),
'access arguments append' => TRUE,
),
),
);
return $uuid_resource;
}