You are here

public function LatlngWidget::buildForm in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_demo/src/Form/LatlngWidget.php \Drupal\geolocation_demo\Form\LatlngWidget::buildForm()

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 FormInterface::buildForm

File

modules/geolocation_demo/src/Form/LatlngWidget.php, line 22

Class

LatlngWidget
Returns responses for geolocation_demo module routes.

Namespace

Drupal\geolocation_demo\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $widget_form = $this
    ->getWidgetForm('geolocation_latlng', $form, $form_state);
  $form['widget'] = $widget_form;
  return $form;
}