You are here

public function FastlySettingsForm::__construct in Fastly 8.3

Constructs a FastlySettingsForm object.

Parameters

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

\Drupal\fastly\Api $api: Fastly API for Drupal.

\Drupal\fastly\State $state: Fastly state service for Drupal.

\Drupal\fastly\VclHandler $vclHandler: Vcl handler.

\Drupal\fastly\Services\Webhook $webhook: The Fastly webhook service.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack object.

Overrides ConfigFormBase::__construct

File

src/Form/FastlySettingsForm.php, line 76

Class

FastlySettingsForm
Class FastlySettingsForm Defines a form to configure module settings.

Namespace

Drupal\fastly\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, Api $api, State $state, VclHandler $vclHandler, Webhook $webhook, RequestStack $requestStack) {
  parent::__construct($config_factory);
  $this->api = $api;
  $this->state = $state;
  $this->vclHandler = $vclHandler;
  $this->webhook = $webhook;
  $this->baseUrl = $requestStack
    ->getCurrentRequest()
    ->getHost();
}