You are here

public function SettingsForm::__construct in CloudFlare 8

Constructs a new CloudFlareAdminSettingsForm.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

\Drupal\cloudflare\CloudFlareStateInterface $state: Tracks rate limits associated with CloudFlare API.

\Drupal\cloudflare\CloudFlareZoneInterface $zone_api: ZoneApi instance for accessing api.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Component\Utility\EmailValidator|\Egulias\EmailValidator\EmailValidator $email_validator: The email validator.

\Drupal\cloudflare\CloudFlareComposerDependenciesCheckInterface $check_interface: Checks if composer dependencies are met.

File

src/Form/SettingsForm.php, line 124

Class

SettingsForm
Class SettingsForm.

Namespace

Drupal\cloudflare\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, CloudFlareStateInterface $state, CloudFlareZoneInterface $zone_api, LoggerInterface $logger, $email_validator, CloudFlareComposerDependenciesCheckInterface $check_interface) {
  $this->configFactory = $config_factory;
  $this->state = $state;
  $this->zoneApi = $zone_api;
  $this->logger = $logger;
  $this->emailValidator = $email_validator;
  $this->cloudFlareComposerDependenciesCheck = $check_interface;
  $this->cloudFlareComposerDependenciesMet = $check_interface
    ->check();
}