function wsclient_rest_main_form_submit in Web service client 7
Form submit callback for the main form.
1 call to wsclient_rest_main_form_submit()
- wsclient_rest_form_submit in wsclient_rest/
wsclient_rest.module - Form submit callback for the form.
File
- wsclient_rest/
wsclient_rest.module, line 51 - Web service client endpoint for invoking a RESTful service.
Code
function wsclient_rest_main_form_submit($form, &$form_state) {
foreach (array(
'send_formatter',
'receive_formatter',
) as $formatter_type) {
// Make sure to avoid overridding of the custom formatter, defined in the
// settings.
if ($form_state['values'][$formatter_type]['formatter'] === 'custom') {
continue;
}
// Save settings in the service settings.
$formatter_settings =& $form_state['service']->settings[$formatter_type];
$formatter_settings['class'] = $form_state['values'][$formatter_type]['formatter'];
if (!empty($form_state['values'][$formatter_type]['settings'])) {
$formatter_settings['settings'] = $form_state['values'][$formatter_type]['settings'];
}
}
}