public function GeocoderAutocompleteSettingsForm::buildForm in Geocoder autocomplete 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ GeocoderAutocompleteSettingsForm.php, line 30
Class
- GeocoderAutocompleteSettingsForm
- Defines a form to configure maintenance settings for this site.
Namespace
Drupal\geocoder_autocomplete\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('geocoder_autocomplete.settings');
$form['region_code_bias'] = [
'#type' => 'textfield',
'#title' => t('Region code bias'),
'#default_value' => $config
->get('region_code_bias'),
'#maxlength' => 2,
'#description' => t('2 letter region code used as a bias for geocoding requests.'),
];
return parent::buildForm($form, $form_state);
}