function patchinfo_update_settings_form_submit in PatchInfo 8.2
Same name and namespace in other branches
- 8 patchinfo.module \patchinfo_update_settings_form_submit()
- 7 patchinfo.module \patchinfo_update_settings_form_submit()
Submission handler for extended update settings form.
Parameters
array $form: Drupal Form API form information.
\Drupal\Core\Form\FormStateInterface $form_state: Drupal Form API form state information.
1 string reference to 'patchinfo_update_settings_form_submit'
- patchinfo_form_update_settings_alter in ./patchinfo.module 
- Implements hook_form_FORM_ID_alter() for update_settings().
File
- ./patchinfo.module, line 122 
- Patch Info primary module file.
Code
function patchinfo_update_settings_form_submit(array $form, FormStateInterface &$form_state) {
  // Get value of exclude from update check setting from form state and prepare
  // it for storage.
  $exclude_modules = $form_state
    ->getValue('patchinfo_exclude_from_update_check');
  $exclude_modules = array_map('trim', explode("\n", $exclude_modules));
  $exclude_modules = array_filter($exclude_modules);
  // Store exclude from update check setting in configuration.
  $config = \Drupal::service('config.factory')
    ->getEditable('patchinfo.settings')
    ->set('exclude from update check', $exclude_modules)
    ->save();
}