You are here

public function FacebookSettingsForm::submitForm in Media entity facebook 3.x

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/FacebookSettingsForm.php, line 63

Class

FacebookSettingsForm
Provides a form to configure Facebook credentials.

Namespace

Drupal\media_entity_facebook\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('media_entity_facebook.settings')
    ->set('facebook_app_id', $form_state
    ->getValue('facebook_app_id'))
    ->set('facebook_app_secret', $form_state
    ->getValue('facebook_app_secret'))
    ->save();
  parent::submitForm($form, $form_state);
}