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