You are here

public function FieldInheritanceSettingsForm::submitForm in Field Inheritance 8

Same name and namespace in other branches
  1. 2.0.x src/Form/FieldInheritanceSettingsForm.php \Drupal\field_inheritance\Form\FieldInheritanceSettingsForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

Drupal\Core\Form\FormStateInterface $form_state: An associative array containing the current state of the form.

Overrides ConfigFormBase::submitForm

File

src/Form/FieldInheritanceSettingsForm.php, line 93

Class

FieldInheritanceSettingsForm
Provides a form for configuring field inheritance settings.

Namespace

Drupal\field_inheritance\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('field_inheritance.config')
    ->set('included_entities', implode(',', array_filter($form_state
    ->getValue('included_entities'))))
    ->set('included_bundles', implode(',', array_filter($form_state
    ->getValue('included_bundles'))))
    ->save();
  parent::submitForm($form, $form_state);
}