public function LeafletMap::__construct in Leaflet 2.0.x
Same name and namespace in other branches
- 8 modules/leaflet_views/src/Plugin/views/style/LeafletMap.php \Drupal\leaflet_views\Plugin\views\style\LeafletMap::__construct()
- 2.1.x modules/leaflet_views/src/Plugin/views/style/LeafletMap.php \Drupal\leaflet_views\Plugin\views\style\LeafletMap::__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\Session\AccountInterface $current_user: Current user service.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Leaflet\LeafletService $leaflet_service: The Leaflet service.
\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.
\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type plugin manager service.
Overrides PluginBase::__construct
File
- modules/
leaflet_views/ src/ Plugin/ views/ style/ LeafletMap.php, line 200
Class
- LeafletMap
- Style plugin to render a View output as a Leaflet map.
Namespace
Drupal\leaflet_views\Plugin\views\styleCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, EntityFieldManagerInterface $entity_field_manager, EntityDisplayRepositoryInterface $entity_display, AccountInterface $current_user, MessengerInterface $messenger, RendererInterface $renderer, ModuleHandlerInterface $module_handler, LeafletService $leaflet_service, LinkGeneratorInterface $link_generator, FieldTypePluginManagerInterface $field_type_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->defaultSettings = self::getDefaultSettings();
$this->entityManager = $entity_manager;
$this->entityFieldManager = $entity_field_manager;
$this->entityDisplay = $entity_display;
$this->currentUser = $current_user;
$this->messenger = $messenger;
$this->renderer = $renderer;
$this->moduleHandler = $module_handler;
$this->leafletService = $leaflet_service;
$this->link = $link_generator;
$this->fieldTypeManager = $field_type_manager;
}