You are here

public function SendinblueApiV2::getTemplate in SendinBlue 7.2

Get template by id.

Parameters

string $id: A template identification.

Return value

GetSmtpTemplateOverview A template.

Overrides SendInBlueApiInterface::getTemplate

File

includes/Api/SendinblueApiV2.php, line 102

Class

SendinblueApiV2
Sendinblue REST client.

Code

public function getTemplate($id) {
  $templates = $this
    ->getTemplates();
  foreach ($templates
    ->getTemplates() as $template) {
    if ($template
      ->getId() === $id) {
      return $template;
    }
  }
  return NULL;
}