function mostpopular_service_config_form_submit in Drupal Most Popular 7
Same name and namespace in other branches
- 6 mostpopular.admin.inc \mostpopular_service_config_form_submit()
1 string reference to 'mostpopular_service_config_form_submit'
File
- ./
mostpopular.services.inc, line 432 - Provides an admin GUI for configuring services.
Code
function mostpopular_service_config_form_submit($form, &$form_state) {
$service = $form_state['service'];
// Copy in the values
foreach ($form_state['values']['data'] as $key => $value) {
$service->data[$key] = $value;
}
$service->status = MOSTPOPULAR_SERVICE_STATUS_CONFIGURED;
// Let the service handle the form submission
_mostpopular_invoke('config_form_submit', $service, $form_state);
// Save changes to the service
mostpopular_service_save($service);
drupal_set_message(t('This service has been configured.'));
$form_state['redirect'] = 'admin/config/mostpopular/services';
}