function node_resource_service_resource in Services 7
Same name and namespace in other branches
- 6.2 services/node_service/node_resource.module \node_resource_service_resource()
File
- services/
node_service/ node_resource.module, line 14
Code
function node_resource_service_resource() {
return array(
'node' => array(
'#file' => array(
'file' => 'inc',
'module' => 'node_resource',
),
'#retrieve' => array(
'#callback' => '_node_resource_retrieve',
'#args' => array(
array(
'#name' => 'nid',
'#optional' => FALSE,
'#source' => array(
'path' => 0,
),
'#type' => 'int',
'#description' => 'The nid of the node to get',
),
),
'#models' => array(
'ResourceFeedModel' => array(
'class' => 'NodeResourceFeedModel',
'arguments' => array(
'source' => 'single',
),
),
),
'#access callback' => '_node_resource_access',
'#access arguments' => array(
'view',
),
'#access arguments append' => TRUE,
),
'#create' => array(
'#callback' => '_node_resource_create',
'#args' => array(
array(
'#name' => 'node',
'#optional' => FALSE,
'#source' => 'data',
'#description' => 'The node object to create',
'#type' => 'struct',
),
),
'#access callback' => '_node_resource_access',
'#access arguments' => array(
'create',
),
'#access arguments append' => TRUE,
),
'#update' => array(
'#callback' => '_node_resource_update',
'#args' => array(
array(
'#name' => 'node',
'#optional' => FALSE,
'#source' => 'data',
'#description' => 'The node data to update',
'#type' => 'struct',
),
),
'#access callback' => '_node_resource_access',
'#access arguments' => array(
'update',
),
'#access arguments append' => TRUE,
),
'#delete' => array(
'#callback' => '_node_resource_delete',
'#args' => array(
array(
'#name' => 'nid',
'#optional' => FALSE,
'#source' => array(
'path' => 0,
),
),
),
'#access callback' => '_node_resource_access',
'#access arguments' => array(
'delete',
),
'#access arguments append' => TRUE,
),
'#index' => array(
'#callback' => '_node_resource_index',
'#args' => array(
array(
'#name' => 'page',
'#optional' => TRUE,
'#type' => 'int',
'#description' => 'The zero-based index of the page to get, defaults to 0.',
'#default value' => 0,
'#source' => array(
'param' => 'page',
),
),
array(
'#name' => 'fields',
'#optional' => TRUE,
'#type' => 'string',
'#description' => 'The fields to get.',
'#default value' => '',
'#source' => array(
'param' => 'fields',
),
),
array(
'#name' => 'parameters',
'#optional' => TRUE,
'#type' => 'struct',
'#description' => 'Parameters',
'#default value' => NULL,
'#source' => 'param',
),
),
'#models' => array(
'ResourceFeedModel' => array(
'class' => 'NodeResourceFeedModel',
),
'ResourceTimeFeedModel' => array(
'class' => 'NodeResourceFeedModel',
),
),
'#access arguments' => array(
'access content',
),
'#access arguments append' => TRUE,
),
),
);
}