You are here

public function OpenlayersWidgetBase::__construct in Openlayers 8.4

OpenlayersWidget 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\openlayers\OpenlayersService $openlayers_service: The Openlayers service.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/OpenlayersWidgetBase.php, line 42

Class

OpenlayersWidgetBase
Base class for the field widget when displaying an Openlayers map.

Namespace

Drupal\openlayers\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, OpenlayersService $openlayers_service) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->openlayersService = $openlayers_service;
}