You are here

public function SendinblueManager::updateSendinblueMailin in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/SendinblueManager.php \Drupal\sendinblue\SendinblueManager::updateSendinblueMailin()

Change Class Class in function of API version.

Parameters

string $accessKey: The SiB access key.

Return value

\Drupal\sendinblue\Tools\Api\SendInBlueApiInterface SendInBlueApiInterface (V2 or V3)

1 call to SendinblueManager::updateSendinblueMailin()
SendinblueManager::__construct in src/SendinblueManager.php
EntityModerationForm constructor.

File

src/SendinblueManager.php, line 228

Class

SendinblueManager
Basic manager of module.

Namespace

Drupal\sendinblue

Code

public function updateSendinblueMailin($accessKey) {
  if ($this
    ->getApiVersion($accessKey) === self::SENDINBLUE_API_VERSION_V3) {
    $this->sendinblueMailin = $this->sendinblueApiV3;
  }
  else {
    $this->sendinblueMailin = $this->sendinblueApiV2;
  }
  $this->sendinblueMailin
    ->setApiKey($accessKey);
  return $this->sendinblueMailin;
}