Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'create-product' => array(
- 'operations' => array(
- 'create' => array(
- 'help' => t('Add Product'),
- 'file' => array(
- 'type' => 'endpoints.inc',
- 'module' => 'custommodule',
- 'name' => 'custommodule',
- ),
- 'callback' => 'custommodule_create_product',
- 'args' => array(
- array(
- 'name' => 'appID',
- 'type' => 'int',
- 'description' => t("App ID"),
- 'source' => array('data' => 'appID'),
- 'optional' => FALSE
- ),
- ...
- // ...
- 'access callback' => '_example_resource_access',
- 'access callback file' => array(
- 'type' => 'inc',
- 'module' => 'example',
- 'name' => 'example.resource-access',
- ),
- 'access arguments' => array('foo bar'),
- 'access arguments append' => TRUE,
- // ...
- function _example_resource_access($op, $args = array()) {
- if ($op == 'foo bar' && !is_numeric($args[0])) {
- return services_error(t('That is not an integer.'), 406);
- }
- return TRUE;
- }
Add Comment
Please, Sign In to add comment