public function FlagSearchApiConfigForm::submitForm in Flag Search API 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/ FlagSearchApiConfigForm.php, line 58
Class
- FlagSearchApiConfigForm
- Implements a FlagSearchApiConfig form.
Namespace
Drupal\flag_search_api\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->configFactory
->getEditable('flag_search_api.settings');
$config
->set('reindex_on_flagging', $form_state
->getValue('reindex_on_flagging'));
$config
->save();
parent::submitForm($form, $form_state);
}