You are here

public function DefaultField::__construct in Geocoder 8.2

Same name and namespace in other branches
  1. 8.3 modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php \Drupal\geocoder_field\Plugin\Geocoder\Field\DefaultField::__construct()

Constructs a 'default' plugin.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.

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

\Drupal\geocoder_field\GeocoderFieldPluginManager $field_plugin_manager: The plugin manager for this type of plugins.

\Drupal\geocoder\DumperPluginManager $dumper_plugin_manager: The dumper plugin manager service.

\Drupal\geocoder\ProviderPluginManager $provider_plugin_manager: The provider plugin manager service.

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

\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.

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

Overrides PluginBase::__construct

File

modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php, line 120

Class

DefaultField
Provides a default generic geocoder field plugin.

Namespace

Drupal\geocoder_field\Plugin\Geocoder\Field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, GeocoderFieldPluginManager $field_plugin_manager, DumperPluginManager $dumper_plugin_manager, ProviderPluginManager $provider_plugin_manager, RendererInterface $renderer, LinkGeneratorInterface $link_generator, EntityFieldManagerInterface $entity_field_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->config = $config_factory
    ->get('geocoder.settings');
  $this->moduleHandler = $module_handler;
  $this->fieldPluginManager = $field_plugin_manager;
  $this->dumperPluginManager = $dumper_plugin_manager;
  $this->providerPluginManager = $provider_plugin_manager;
  $this->renderer = $renderer;
  $this->link = $link_generator;
  $this->entityFieldManager = $entity_field_manager;
}