public function GeofieldGoogleMapFormatter::__construct in Geofield Map 8.2
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldFormatter/GeofieldGoogleMapFormatter.php \Drupal\geofield_map\Plugin\Field\FieldFormatter\GeofieldGoogleMapFormatter::__construct()
GeofieldGoogleMapFormatter 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.
string $label: The formatter label display setting.
string $view_mode: The view mode.
array $third_party_settings: Any third party settings settings.
\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\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: Entity display repository service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The Entity Field Manager.
\Drupal\geofield\GeoPHP\GeoPHPInterface $geophp_wrapper: The The geoPhpWrapper.
\Drupal\Core\Render\RendererInterface $renderer: The Renderer service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\core\Utility\Token $token: The token service.
\Drupal\geofield_map\Services\GoogleMapsService $google_maps_service: The Google Maps service.
\Drupal\geofield_map\Services\MarkerIconService $marker_icon_service: The Marker Icon Service.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ GeofieldGoogleMapFormatter.php, line 185
Class
- GeofieldGoogleMapFormatter
- Plugin implementation of the 'geofield_google_map' formatter.
Namespace
Drupal\geofield_map\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, LinkGeneratorInterface $link_generator, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, EntityFieldManagerInterface $entity_field_manager, GeoPHPInterface $geophp_wrapper, RendererInterface $renderer, ModuleHandlerInterface $module_handler, Token $token, GoogleMapsService $google_maps_service, MarkerIconService $marker_icon_service) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->defaultSettings = self::getDefaultSettings();
$this->config = $config_factory;
$this->link = $link_generator;
$this->entityTypeManager = $entity_type_manager;
$this->entityDisplayRepository = $entity_display_repository;
$this->entityFieldManager = $entity_field_manager;
$this->geoPhpWrapper = $geophp_wrapper;
$this->renderer = $renderer;
$this->moduleHandler = $module_handler;
$this->token = $token;
$this->googleMapsService = $google_maps_service;
$this->markerIcon = $marker_icon_service;
}