public function Settings::submitForm in Config Ignore 8
Same name and namespace in other branches
- 8.3 src/Form/Settings.php \Drupal\config_ignore\Form\Settings::submitForm()
- 8.2 src/Form/Settings.php \Drupal\config_ignore\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 53
Class
- Settings
- Provides a setting UI for Config Ignore.
Namespace
Drupal\config_ignore\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$config_ignore_settings = $this
->config('config_ignore.settings');
$config_ignore_settings_array = preg_split("[\n|\r]", $values['ignored_config_entities']);
$config_ignore_settings_array = array_filter($config_ignore_settings_array);
$config_ignore_settings
->set('ignored_config_entities', $config_ignore_settings_array);
$config_ignore_settings
->save();
parent::submitForm($form, $form_state);
}