You are here

public function GeofieldMapWidget::__construct in Geofield Map 8.2

Same name and namespace in other branches
  1. 8 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\geofield\Plugin\GeofieldBackendManager $geofield_backend_manager: The geofieldBackendManager.

\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\LeafletTileLayerPluginManager $leaflet_tile_manager: The LeafletTileLayer Manager service.

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

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

\Drupal\geofield_map\Services\GeocoderService $geofield_map_geocoder: The Geofield Map Geocoder Service.

Overrides GeofieldBaseWidget::__construct

File

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

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, GeofieldBackendManager $geofield_backend_manager, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, RendererInterface $renderer, EntityFieldManagerInterface $entity_field_manager, LinkGeneratorInterface $link_generator, LeafletTileLayerPluginManager $leaflet_tile_manager, AccountInterface $current_user, ModuleHandlerInterface $module_handler, GeocoderService $geofield_map_geocoder) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $geophp_wrapper, $wkt_generator, $geofield_backend_manager);
  $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;
  $this->moduleHandler = $module_handler;
  $this->geofieldGmapGeocoder = $geofield_map_geocoder;
}