You are here

public function GeofieldMapWidget::__construct in Geofield Map 8

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

GeofieldMapWidget 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|null $geophp_wrapper: The geoPhpWrapper.

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

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The Translation service.

\Drupal\Core\Render\RendererInterface $renderer: The Renderer service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The Entity Field Manager.

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

\Drupal\geofield_map\leafletTileLayer\LeafletTileLayerPluginManager $leaflet_tile_manager: The LeafletTileLayer Manager service.

\Drupal\Core\Session\AccountInterface $current_user: The Current User.

Overrides GeofieldBaseWidget::__construct

File

src/Plugin/Field/FieldWidget/GeofieldMapWidget.php, line 150

Class

GeofieldMapWidget
Plugin implementation of the 'geofield_map' widget.

Namespace

Drupal\geofield_map\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, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, RendererInterface $renderer, EntityFieldManagerInterface $entity_field_manager, LinkGeneratorInterface $link_generator, LeafletTileLayerPluginManager $leaflet_tile_manager, AccountInterface $current_user) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $geophp_wrapper, $wkt_generator);
  $this->config = $config_factory;
  $this->renderer = $renderer;
  $this->entityFieldManager = $entity_field_manager;
  $this->link = $link_generator;
  $this->wktGenerator = $wkt_generator;
  $this->leafletTileManager = $leaflet_tile_manager;
  $this->leafletTileLayers = $this->leafletTileManager
    ->getLeafletTileLayers();
  $this->currentUser = $current_user;
}