public function CloudFlarePurger::__construct in CloudFlare 8
Constructs a \Drupal\Component\Plugin\CloudFlarePurger.
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 factory for configuration objects.
\Drupal\cloudflare\CloudFlareStateInterface $state: Tracks limits associated with CloudFlare Api.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Drupal\cloudflare\CloudFlareComposerDependenciesCheckInterface $checker: Tests that composer dependencies are met.
Throws
\LogicException Thrown if $configuration['id'] is missing, see Purger\Service::createId.
Overrides PurgerBase::__construct
File
- modules/
cloudflarepurger/ src/ Plugin/ Purge/ Purger/ CloudFlarePurger.php, line 108
Class
- CloudFlarePurger
- CloudFlare purger.
Namespace
Drupal\cloudflarepurger\Plugin\Purge\PurgerCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, CloudFlareStateInterface $state, LoggerInterface $logger, CloudFlareComposerDependenciesCheckInterface $checker) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->config = $config_factory
->get('cloudflare.settings');
$this->state = $state;
$this->logger = $logger;
$this->areCloudflareComposerDepenciesMet = $checker
->check();
}