function wsclient_rest_formatters_as_options in Web service client 7
Returns a list of formatters, suitable for use as form options.
2 calls to wsclient_rest_formatters_as_options()
- WSClientRESTEndpoint::formAlter in wsclient_rest/
wsclient_rest.inc - Adds options to the Web Service config form specific to the REST service.
- wsclient_rest_form_submit in wsclient_rest/
wsclient_rest.module - Form submit callback for the form.
File
- wsclient_rest/
wsclient_rest.module, line 78 - Web service client endpoint for invoking a RESTful service.
Code
function wsclient_rest_formatters_as_options() {
$options = array();
// Get a list of all format definitions.
$info = module_invoke_all('wsclient_rest_formatter_info');
// Turn this list into the options array.
foreach ($info as $formatter_class => $implementation) {
$options[$implementation['format']][$formatter_class] = $implementation['label'];
}
return $options;
}