entity_share_server.api.php in Entity Share 7
Hooks provided by the Entity Share Server module.
File
modules/entity_share_server/entity_share_server.api.phpView source
<?php
/**
* @file
* Hooks provided by the Entity Share Server module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alter the response formatter to manage new response http content types.
*
* @param array $formatter
* The formatter callbacks of http content types.
* Callback must return the formatted response.
* Example of formatter:
* - array('application/json' => 'mycallback')
* - array('application/json' => array($class, 'mycallback'))
* - array('application/json' => 'function(){}).
*/
function hook_es_server_rest_response_formatter_alter(array &$formatter) {
$formatter['application/json'] = function ($result, $server) {
return drupal_json_encode($result);
};
}
/**
* @} End of "addtogroup hooks".
*/
Functions
Name | Description |
---|---|
hook_es_server_rest_response_formatter_alter | Alter the response formatter to manage new response http content types. |