You are here

public function Settings::submitForm in Entity Update 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/Settings.php \Drupal\entity_update\Form\Settings::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

File

src/Form/Settings.php, line 69

Class

Settings
Entity update settings form.

Namespace

Drupal\entity_update\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $list = [
    'excludes',
  ];
  $config = $this
    ->config(EntityUpdateHelper::getConfigName());
  foreach ($list as $item) {
    $config
      ->set($item, $form_state
      ->getValue($item));
  }
  $config
    ->save();
  parent::submitForm($form, $form_state);
}