You are here

public function APIKeysForm::buildForm in Geocoder 8

.

Overrides ConfigFormBase::buildForm

File

src/Form/APIKeysForm.php, line 24
Contains \Drupal\geocoder\Form\APIKeysForm.

Class

APIKeysForm
@TODO: Write something here

Namespace

Drupal\geocoder\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('geocoder.google');
  $form['google_api_key'] = array(
    '#type' => 'textfield',
    '#title' => $this
      ->t("Google API Key"),
    '#default_value' => $config
      ->get('api_key'),
  );
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => $this
      ->t('Save'),
    '#button_type' => 'primary',
  );
  return $form;
}