You are here

public function LtiToolProviderSettingsForm::submitForm in LTI Tool Provider 2.x

Same name and namespace in other branches
  1. 8 src/Form/LtiToolProviderSettingsForm.php \Drupal\lti_tool_provider\Form\LtiToolProviderSettingsForm::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/LtiToolProviderSettingsForm.php, line 45

Class

LtiToolProviderSettingsForm

Namespace

Drupal\lti_tool_provider\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $settings = $this
    ->config('lti_tool_provider.settings');
  $settings
    ->set('iframe', $form_state
    ->getValue('iframe'))
    ->save();
  $settings
    ->set('destination', $form_state
    ->getValue('destination'))
    ->save();
  parent::submitForm($form, $form_state);
}