public function ConfigurableProviderUsingHandlerWithAdapterBase::__construct in Geocoder 8.3
Constructs a new configurable geocoder provider using handlers.
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: The config factory service.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend used to cache geocoding data.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The Drupal language manager service.
\Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager: The typed config manager.
\Http\Client\HttpClient $http_adapter: The HTTP adapter.
\Drupal\geocoder\GeocoderThrottleInterface $throttle: The Geocoder Throttle service.
Overrides ProviderUsingHandlerWithAdapterBase::__construct
File
- src/
ConfigurableProviderUsingHandlerWithAdapterBase.php, line 61
Class
- ConfigurableProviderUsingHandlerWithAdapterBase
- Provides a base class for providers using handlers with HTTP adapter.
Namespace
Drupal\geocoderCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, TypedConfigManagerInterface $typed_config_manager, HttpClient $http_adapter, GeocoderThrottleInterface $throttle) {
try {
// The typedConfigManager property needs to be set before the constructor,
// to prevent its possible exception, and allow the
// getConfigSchemaDefinition().
$this->typedConfigManager = $typed_config_manager;
parent::__construct($configuration, $plugin_id, $plugin_definition, $config_factory, $cache_backend, $language_manager, $http_adapter);
$this
->setConfiguration($configuration);
$this->throttle = $throttle;
} catch (InvalidPluginDefinitionException $e) {
watchdog_exception('geocoder', $e);
}
}