public function AssignmentExcludeForm::submitForm in Features 8.4
Same name and namespace in other branches
- 8.3 modules/features_ui/src/Form/AssignmentExcludeForm.php \Drupal\features_ui\Form\AssignmentExcludeForm::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 FormInterface::submitForm
File
- modules/
features_ui/ src/ Form/ AssignmentExcludeForm.php, line 170
Class
- AssignmentExcludeForm
- Configures the selected configuration assignment method for this site.
Namespace
Drupal\features_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Merge in selections.
$settings = $this->currentBundle
->getAssignmentSettings(self::METHOD_ID);
$settings = array_merge($settings, [
'types' => $form_state
->getValue('types'),
'curated' => $form_state
->getValue('curated'),
'module' => $form_state
->getValue('module'),
]);
$this->currentBundle
->setAssignmentSettings(self::METHOD_ID, $settings)
->save();
$this
->setRedirect($form_state);
$this
->messenger()
->addStatus($this
->t('Package assignment configuration saved.'));
}