public static function PostmarkHandler::checkLibrary in Postmark 8
Check that the Postmark PHP API is installed correctly.
2 calls to PostmarkHandler::checkLibrary()
- PostmarkHandler::validateKey in src/
PostmarkHandler.php - Validates Postmark API key.
- postmark_requirements in ./
postmark.install - Implements hook_requirements().
File
- src/
PostmarkHandler.php, line 147
Class
- PostmarkHandler
- Mail handler to send out an email message array to the Postmark API.
Namespace
Drupal\postmarkCode
public static function checkLibrary($showMessage = FALSE) {
$libraryStatus = class_exists('\\Postmark\\PostmarkClient');
if ($showMessage === FALSE) {
return $libraryStatus;
}
if ($libraryStatus === FALSE) {
\Drupal::messenger()
->addWarning(t('The Postmark PHP library has not been installed correctly.'));
}
return $libraryStatus;
}