function opigno_module_form_system_file_system_settings_submit in Opigno module 8
Same name and namespace in other branches
- 3.x opigno_module.module \opigno_module_form_system_file_system_settings_submit()
Implements additional submit for the file system settings form.
1 string reference to 'opigno_module_form_system_file_system_settings_submit'
File
- ./
opigno_module.module, line 1111 - Contains opigno_module.module.
Code
function opigno_module_form_system_file_system_settings_submit($form, FormStateInterface $form_state) {
$config = \Drupal::configFactory()
->getEditable('opigno_module.settings');
if ($form_state
->hasValue('file_libreoffice_configs_path')) {
$config
->set('libreoffice_configs_path', $form_state
->getValue('file_libreoffice_configs_path'));
}
if ($form_state
->hasValue('file_libreoffice_bin_path')) {
$config
->set('libreoffice_bin_path', $form_state
->getValue('file_libreoffice_bin_path'));
}
if ($form_state
->hasValue('file_imagemagick_bin_path')) {
$config
->set('imagemagick_bin_path', $form_state
->getValue('file_imagemagick_bin_path'));
}
$config
->save();
}