ConfigurableProviderUsingHandlerBase.php in Geocoder 8.3
File
src/ConfigurableProviderUsingHandlerBase.php
View source
<?php
declare (strict_types=1);
namespace Drupal\geocoder;
use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\geocoder\Traits\ConfigurableProviderTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
abstract class ConfigurableProviderUsingHandlerBase extends ProviderUsingHandlerBase implements ConfigurableInterface, PluginFormInterface {
use ConfigurableProviderTrait;
protected $typedConfigManager;
public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, TypedConfigManagerInterface $typed_config_manager) {
try {
$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);
}
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('config.factory'), $container
->get('cache.geocoder'), $container
->get('language_manager'), $container
->get('config.typed'));
}
}