You are here

public function GeofieldGoogleMapFormatter::__construct in Geofield Map 8

Same name and namespace in other branches
  1. 8.2 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.

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/GeofieldGoogleMapFormatter.php, line 133

Class

GeofieldGoogleMapFormatter
Plugin implementation of the 'geofield_google_map' formatter.

Namespace

Drupal\geofield_map\Plugin\Field\FieldFormatter

Code

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) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $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;
}