public function GatsbyAdminForm::submitForm in Gatsby Live Preview & Incremental Builds 8
Same name and namespace in other branches
- 2.0.x src/Form/GatsbyAdminForm.php \Drupal\gatsby\Form\GatsbyAdminForm::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
1 call to GatsbyAdminForm::submitForm()
- GatsbyInstantPreviewAdminForm::submitForm in modules/
gatsby_instantpreview/ src/ Form/ GatsbyInstantPreviewAdminForm.php - Form submission handler.
1 method overrides GatsbyAdminForm::submitForm()
- GatsbyInstantPreviewAdminForm::submitForm in modules/
gatsby_instantpreview/ src/ Form/ GatsbyInstantPreviewAdminForm.php - Form submission handler.
File
- src/
Form/ GatsbyAdminForm.php, line 207
Class
- GatsbyAdminForm
- Defines a config form to store Gatsby configuration.
Namespace
Drupal\gatsby\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('gatsby.settings')
->set('server_url', $form_state
->getValue('server_url'))
->set('preview_callback_url', $form_state
->getValue('preview_callback_url'))
->set('incrementalbuild_url', $form_state
->getValue('incrementalbuild_url'))
->set('build_published', $form_state
->getValue('build_published'))
->set('preview_entity_types', array_values(array_filter($form_state
->getValue('preview_entity_types'))))
->set('path_mapping', $form_state
->getValue('path_mapping'))
->save();
}