You are here

public function LeafletWidget::__construct in Leaflet Widget for Geofield 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/LeafletWidget.php \Drupal\leaflet_widget\Plugin\Field\FieldWidget\LeafletWidget::__construct()

LeafletWidget constructor.

Parameters

string $plugin_id: The plugin_id for the formatter.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.

array $settings: The formatter settings.

array $third_party_settings: Any third party settings settings.

\Drupal\geofield\GeoPHP\GeoPHPInterface $geophp_wrapper: The geoPhpWrapper.

\Drupal\geofield\WktGeneratorInterface $wkt_generator: The WKT format Generator service.

\Drupal\leaflet\LeafletService $leaflet_service: The Leaflet service.

Overrides GeofieldBaseWidget::__construct

File

src/Plugin/Field/FieldWidget/LeafletWidget.php, line 55

Class

LeafletWidget
Plugin implementation of the "leaflet_widget" widget.

Namespace

Drupal\leaflet_widget\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, GeoPHPInterface $geophp_wrapper, WktGeneratorInterface $wkt_generator, LeafletService $leaflet_service) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $geophp_wrapper, $wkt_generator);
  $this->leafletService = $leaflet_service;
}