public function LearningPathAdminSettingsForm::submitForm in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Form/LearningPathAdminSettingsForm.php \Drupal\opigno_learning_path\Form\LearningPathAdminSettingsForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ LearningPathAdminSettingsForm.php, line 225
Class
- LearningPathAdminSettingsForm
- Class LearningPathAdminSettingsForm.
Namespace
Drupal\opigno_learning_path\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('opigno_learning_path.learning_path_settings')
->set('opigno_learning_path_notify_admin', $form_state
->getValue('opigno_learning_path_notify_admin'))
->set('opigno_learning_path_notify_admin_mails', $form_state
->getValue('opigno_learning_path_notify_admin_mails'))
->set('opigno_learning_path_notify_users', $form_state
->getValue('opigno_learning_path_notify_users'))
->set('opigno_learning_path_notify_admin_user_subscribed', $form_state
->getValue('opigno_learning_path_notify_admin_user_subscribed'))
->set('opigno_learning_path_notify_admin_user_approval', $form_state
->getValue('opigno_learning_path_notify_admin_user_approval'))
->set('opigno_learning_path_notify_admin_user_blocked', $form_state
->getValue('opigno_learning_path_notify_admin_user_blocked'))
->set('opigno_learning_path_notify_user_user_subscribed', $form_state
->getValue('opigno_learning_path_notify_user_user_subscribed'))
->set('opigno_learning_path_notify_user_user_approval', $form_state
->getValue('opigno_learning_path_notify_user_user_approval'))
->set('opigno_learning_path_notify_user_user_blocked', $form_state
->getValue('opigno_learning_path_notify_user_user_blocked'))
->set('opigno_learning_path_notify_user_user_certificate_expired', $form_state
->getValue('opigno_learning_path_notify_user_user_certificate_expired'))
->set('opigno_learning_path_student_does_activity_notify', $form_state
->getValue('opigno_learning_path_student_does_activity_notify'))
->set('opigno_learning_path_student_does_activity', $form_state
->getValue('opigno_learning_path_student_does_activity'))
->set('opigno_learning_path_students_answer_is_reviewed_notify', $form_state
->getValue('opigno_learning_path_students_answer_is_reviewed_notify'))
->set('opigno_learning_path_students_answer_is_reviewed', $form_state
->getValue('opigno_learning_path_students_answer_is_reviewed'))
->save();
}