function wsclient_rest_form_submit in Web service client 7
Form submit callback for the form.
1 string reference to 'wsclient_rest_form_submit'
- WSClientRESTEndpoint::formAlter in wsclient_rest/
wsclient_rest.inc - Adds options to the Web Service config form specific to the REST service.
File
- wsclient_rest/
wsclient_rest.module, line 23 - Web service client endpoint for invoking a RESTful service.
Code
function wsclient_rest_form_submit($form, &$form_state) {
// Allow formatters to react on form submit.
$options = wsclient_rest_formatters_as_options();
foreach ($options as $options_groupped) {
foreach (array_keys($options_groupped) as $formatter_class) {
if ($formatter_class == 'custom') {
// Skip custom.
continue;
}
$formatter = new $formatter_class();
if (method_exists($formatter, 'formSubmit')) {
$formatter
->formSubmit($form, $form_state);
}
}
}
switch ($form_state['form']) {
case 'main':
wsclient_rest_main_form_submit($form, $form_state);
break;
case 'operation':
wsclient_rest_operation_form_submit($form, $form_state);
break;
}
}