protected function CountryMappingForm::getSourceFormItem in Flags 8
@inheritDoc
Overrides ConfigEntityFormBase::getSourceFormItem
File
- flags_ui/
src/ Form/ CountryMappingForm.php, line 44
Class
- CountryMappingForm
- @inheritDoc
Namespace
Drupal\flags_ui\FormCode
protected function getSourceFormItem(FlagMapping $mapping) {
return [
'#type' => 'select',
'#title' => $this
->t('Source country'),
'#options' => $this->countries,
'#empty_value' => '',
// Unfortunately countries are indexed with uppercase letters
// se we make sure our ids are correct.
'#default_value' => strtoupper($mapping
->getFlag()),
'#description' => $this
->t('Select a target territory flag.'),
'#required' => TRUE,
];
}