You are here

public function ConfigurableProviderUsingHandlerBase::__construct in Geocoder 8.3

Constructs a geocoder provider plugin object.

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 service.

Overrides ProviderUsingHandlerBase::__construct

File

src/ConfigurableProviderUsingHandlerBase.php, line 49

Class

ConfigurableProviderUsingHandlerBase
Provides a base class for configurable providers using handlers.

Namespace

Drupal\geocoder

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, TypedConfigManagerInterface $typed_config_manager) {
  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);
  } catch (InvalidPluginDefinitionException $e) {
    watchdog_exception('geocoder', $e);
  }
}