public function BaiduMapsSettings::buildForm in Geolocation Field 8.3
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
- modules/
geolocation_baidu/ src/ Form/ BaiduMapsSettings.php, line 18
Class
- BaiduMapsSettings
- Implements the Baidu Maps form controller.
Namespace
Drupal\geolocation_baidu\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->configFactory
->get('baidu_maps.settings');
$form['key'] = [
'#type' => 'textfield',
'#title' => $this
->t('Baidu Maps App ID'),
'#default_value' => $config
->get('key'),
'#description' => $this
->t('Baidu Maps requires users to sign up at <a href="https://http://lbsyun.baidu.com">http://lbsyun.baidu.com</a>.'),
];
return parent::buildForm($form, $form_state);
}