You are here

function hook_restws_resource_info_alter in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.api.php \hook_restws_resource_info_alter()

Alter available resource information.

Parameters

array $resource_info: Resource information as defined in hook_restws_resource_info(). You can move the path of a resouce by setting menu_info. In this example you'll have to retrieve nodes from /mypath.json or /mypath/1.json.

See also

hook_restws_resource_info()

Related topics

1 function implements hook_restws_resource_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

restws_test_restws_resource_info_alter in tests/restws_test.module
Implements hook_restws_resource_info_alter().
1 invocation of hook_restws_resource_info_alter()
restws_get_resource_info in ./restws.module
Returns info about all defined resources.

File

./restws.api.php, line 65
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_restws_resource_info_alter(&$resource_info) {
  $resource_info['node']['class'] = 'MySpecialNodeResourceController';
  $resource_info['node']['menu_path'] = 'mypath';
}