You are here

public function Hubspot::__construct in HubSpot 8

Create the hubspot integration service.

Parameters

\Drupal\Core\State\StateInterface $state: Drupal state api.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: Drupal logger factory.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Drupal config factory.

\GuzzleHttp\ClientInterface $httpClient: Drupal http client.

\Drupal\Core\Mail\MailManagerInterface $mailManager: Drupal mailer service.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: Drupal request stack.

\Drupal\Component\Utility\EmailValidatorInterface $emailValidator: Drupal's email validator.

File

src/Hubspot.php, line 99

Class

Hubspot
Define a service for interacting with the HubSpot CRM.

Namespace

Drupal\hubspot

Code

public function __construct(StateInterface $state, LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, ClientInterface $httpClient, MailManagerInterface $mailManager, RequestStack $requestStack, EmailValidatorInterface $emailValidator) {
  $this->state = $state;
  $this->httpClient = $httpClient;
  $this->config = $config_factory
    ->get('hubspot.settings');
  $this->logger = $logger_factory
    ->get('hubspot');
  $this->mailManager = $mailManager;
  $this->currentRequest = $requestStack
    ->getCurrentRequest();
  $this->emailValidator = $emailValidator;
}