public function FacebookAlbumForm::submitForm in Facebook Album 8
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/ FacebookAlbumForm.php, line 134 - Contains \Drupal\facebook_album\Form\FacebookAlbumForm.
Class
- FacebookAlbumForm
- Configure facebook_album settings for this site.
Namespace
Drupal\facebook_album\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$page_id = $form_state
->getValue('page_id');
$app_id = $form_state
->getValue('app_id');
$app_secret = $form_state
->getValue('app_secret');
$access_token = $form_state
->getValue('access_token');
// Get module configuration.
$this
->config('facebook_album.settings')
->set('page_id', $page_id)
->set('app_id', $app_id)
->set('app_secret', $app_secret)
->set('access_token', $access_token)
->save();
parent::submitForm($form, $form_state);
}