public function EnvironmentIndicatorForm::save in Environment Indicator 8.3
Same name and namespace in other branches
- 4.x src/EnvironmentIndicatorForm.php \Drupal\environment_indicator\EnvironmentIndicatorForm::save()
Save your config entity.
There will eventually be default code to rely on here, but it doesn't exist yet.
Overrides EntityForm::save
File
- src/
EnvironmentIndicatorForm.php, line 62
Class
- EnvironmentIndicatorForm
- Form field specifications.
Namespace
Drupal\environment_indicatorCode
public function save(array $form, FormStateInterface $form_state) {
$environment = $this
->getEntity();
$environment
->save();
$this
->messenger()
->addMessage($this
->t('Saved the %label environment.', [
'%label' => $environment
->label(),
]));
$form_state
->setRedirect('entity.environment_indicator.collection');
}