1 system.admin.inc system_image_toolkit_settings_submit($form, &$form_state)

Submit handler for system_image_toolkit_settings().

File

core/modules/system/system.admin.inc, line 1991
Admin page callbacks for the System module.

Code

function system_image_toolkit_settings_submit($form, &$form_state) {
  form_state_values_clean($form_state);
  $config = config('system.core');

  // Save the toolkit itself.
  $config->set('image_toolkit', $form_state['values']['image_toolkit']);

  // Save toolkit settings.
  $toolkit_keys = element_children($form['image_toolkit_settings']);
  foreach ($form_state['values'] as $key => $value) {
    if (in_array($key, $toolkit_keys)) {
      $config->set($key, $value);
    }
  }

  $config->save();
  backdrop_set_message(t('The configuration options have been saved.'));
}