public function FileGeocodeFormatter::settingsForm in Geocoder 8.2
Same name and namespace in other branches
- 8.3 modules/geocoder_field/src/Plugin/Field/FieldFormatter/FileGeocodeFormatter.php \Drupal\geocoder_field\Plugin\Field\FieldFormatter\FileGeocodeFormatter::settingsForm()
Returns a form to configure settings for the formatter.
Invoked from \Drupal\field_ui\Form\EntityDisplayFormBase to allow administrators to configure the formatter. The field_ui module takes care of handling submitted form values.
Parameters
array $form: The form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form elements for the formatter settings.
Overrides GeocodeFormatterBase::settingsForm
1 call to FileGeocodeFormatter::settingsForm()
- GeoPhpGeocodeFormatter::settingsForm in modules/
geocoder_geofield/ src/ Plugin/ Field/ FieldFormatter/ GeoPhpGeocodeFormatter.php - Returns a form to configure settings for the formatter.
1 method overrides FileGeocodeFormatter::settingsForm()
- GeoPhpGeocodeFormatter::settingsForm in modules/
geocoder_geofield/ src/ Plugin/ Field/ FieldFormatter/ GeoPhpGeocodeFormatter.php - Returns a form to configure settings for the formatter.
File
- modules/
geocoder_field/ src/ Plugin/ Field/ FieldFormatter/ FileGeocodeFormatter.php, line 139
Class
- FileGeocodeFormatter
- Plugin implementation of the Geocode formatter for File and Image fields.
Namespace
Drupal\geocoder_field\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['intro'] = [
'#type' => 'html_tag',
'#tag' => 'div',
'#value' => $this->pluginDefinition['description'],
];
$element += parent::settingsForm($form, $form_state);
$element['plugins'] = [
$this->formatterPlugin => [
'checked' => [
'#type' => 'value',
'#value' => TRUE,
],
],
];
$element['plugin_info'] = [
'#type' => 'item',
'#title' => 'Plugin',
'#markup' => $this->formatterPlugin,
];
return $element;
}