public function SendinblueApiV3::getTemplates in SendinBlue 8
Same name and namespace in other branches
- 8.2 src/Tools/Api/SendinblueApiV3.php \Drupal\sendinblue\Tools\Api\SendinblueApiV3::getTemplates()
Get templates.
Return value
\Drupal\sendinblue\Tools\Model\GetSmtpTemplates An array of campaigns.
Overrides SendInBlueApiInterface::getTemplates
File
- src/
Tools/ Api/ SendinblueApiV3.php, line 184
Class
- SendinblueApiV3
- Sendinblue REST client.
Namespace
Drupal\sendinblue\Tools\ApiCode
public function getTemplates() {
$templates = $this->sibTransactionalEmailsApi
->getSmtpTemplates();
if ($templates && !empty($templates['templates'])) {
return new GetSmtpTemplates(Json::decode($templates));
}
return [];
}