public function CountryMappingForm::save in Flags 8
@inheritDoc
Overrides ConfigEntityFormBase::save
File
- flags_ui/
src/ Form/ CountryMappingForm.php, line 68
Class
- CountryMappingForm
- @inheritDoc
Namespace
Drupal\flags_ui\FormCode
public function save(array $form, FormStateInterface $form_state) {
// Countries use uppercase but we want to be consistent and always use lowercase for all mappings.
/** @var FlagMapping $mapping */
$mapping = $this
->getEntity();
// TODO: Consider doing this on earlier stage of form submission.
$mapping
->setSource(strtolower($mapping
->getSource()));
return parent::save($form, $form_state);
}