public function GeocodeFormatterBase::__construct in Geocoder 8.3
Same name and namespace in other branches
- 8.2 modules/geocoder_field/src/Plugin/Field/GeocodeFormatterBase.php \Drupal\geocoder_field\Plugin\Field\GeocodeFormatterBase::__construct()
Constructs a GeocodeFormatterBase object.
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.
\Drupal\geocoder\GeocoderInterface $geocoder: The gecoder service.
\Drupal\geocoder\ProviderPluginManager $provider_plugin_manager: The provider plugin manager service.
\Drupal\geocoder\DumperPluginManager $dumper_plugin_manager: The dumper plugin manager service.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
Overrides FormatterBase::__construct
2 calls to GeocodeFormatterBase::__construct()
- AddressGeocodeFormatter::__construct in modules/
geocoder_address/ src/ Plugin/ Field/ FieldFormatter/ AddressGeocodeFormatter.php - Constructs a GeocodeFormatterBase object.
- FileGeocodeFormatter::__construct in modules/
geocoder_field/ src/ Plugin/ Field/ FieldFormatter/ FileGeocodeFormatter.php - Constructs a GeocodeFormatterFile object.
2 methods override GeocodeFormatterBase::__construct()
- AddressGeocodeFormatter::__construct in modules/
geocoder_address/ src/ Plugin/ Field/ FieldFormatter/ AddressGeocodeFormatter.php - Constructs a GeocodeFormatterBase object.
- FileGeocodeFormatter::__construct in modules/
geocoder_field/ src/ Plugin/ Field/ FieldFormatter/ FileGeocodeFormatter.php - Constructs a GeocodeFormatterFile object.
File
- modules/
geocoder_field/ src/ Plugin/ Field/ GeocodeFormatterBase.php, line 117
Class
- GeocodeFormatterBase
- Base Plugin implementation of the Geocode formatter.
Namespace
Drupal\geocoder_field\Plugin\FieldCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, GeocoderInterface $geocoder, ProviderPluginManager $provider_plugin_manager, DumperPluginManager $dumper_plugin_manager, RendererInterface $renderer, LinkGeneratorInterface $link_generator, LoggerChannelFactoryInterface $logger_factory, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->geocoder = $geocoder;
$this->providerPluginManager = $provider_plugin_manager;
$this->dumperPluginManager = $dumper_plugin_manager;
$this->renderer = $renderer;
$this->link = $link_generator;
$this->loggerFactory = $logger_factory;
$this->entityTypeManager = $entity_type_manager;
try {
$this->geocoderProviders = $this->entityTypeManager
->getStorage('geocoder_provider')
->loadMultiple();
} catch (\Exception $e) {
watchdog_exception('geocoder', $e);
}
}