public function BuildHooksGithubConfigForm::submitForm in Build Hooks 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
- modules/
build_hooks_github/ src/ Form/ BuildHooksGithubConfigForm.php, line 49
Class
- BuildHooksGithubConfigForm
- Defines a config form for Github deployments.
Namespace
Drupal\build_hooks_github\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
// Save the api key to configuration:
$this
->config('build_hooks_github.settings')
->set('github_access_token', $form_state
->getValue('github_access_token'))
->save();
}