You are here

public function CourseEnrollmentSettingsForm::submitForm in Course 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/CourseEnrollmentSettingsForm.php \Drupal\course\Form\CourseEnrollmentSettingsForm::submitForm()
  2. 3.x src/Form/CourseEnrollmentSettingsForm.php \Drupal\course\Form\CourseEnrollmentSettingsForm::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/CourseEnrollmentSettingsForm.php, line 42

Class

CourseEnrollmentSettingsForm
Course enrollment settings form.

Namespace

Drupal\course\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('course.settings.enrollment')
    ->setData($form_state
    ->cleanValues()
    ->getValues())
    ->save();
  parent::submitForm($form, $form_state);
}