You are here

public function LeafletDefaultWidget::__construct in Leaflet 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::__construct()
  2. 2.0.x src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::__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.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.

Overrides GeofieldBaseWidget::__construct

File

src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php, line 89

Class

LeafletDefaultWidget
Plugin implementation of the "leaflet_widget" widget.

Namespace

Drupal\leaflet\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, ModuleHandlerInterface $module_handler, LinkGeneratorInterface $link_generator) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $geophp_wrapper, $wkt_generator);
  $this->leafletService = $leaflet_service;
  $this->moduleHandler = $module_handler;
  $this->link = $link_generator;
}