You are here

public function Leaflet::__construct in Leaflet 8

Same name and namespace in other branches
  1. 2.1.x modules/leaflet_views/src/Plugin/views/style/Leaflet.php \Drupal\leaflet_views\Plugin\views\style\Leaflet::__construct()
  2. 2.0.x modules/leaflet_views/src/Plugin/views/style/Leaflet.php \Drupal\leaflet_views\Plugin\views\style\Leaflet::__construct()

Constructs a LeafletMap style instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the formatter.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display: The entity display manager.

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

\Drupal\Leaflet\LeafletService $leaflet_service: The Leaflet service.

Overrides PluginBase::__construct

File

modules/leaflet_views/src/Plugin/views/style/Leaflet.php, line 96

Class

Leaflet
Style plugin to render a View output as a Leaflet map.

Namespace

Drupal\leaflet_views\Plugin\views\style

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, EntityFieldManagerInterface $entity_field_manager, EntityDisplayRepositoryInterface $entity_display, RendererInterface $renderer, LeafletService $leaflet_service) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityManager = $entity_manager;
  $this->entityFieldManager = $entity_field_manager;
  $this->entityDisplay = $entity_display;
  $this->renderer = $renderer;
  $this->leafletService = $leaflet_service;
}