DummyFormatter.php in Mail System 8.4
Namespace
Drupal\mailsystem_test\Plugin\MailFile
tests/modules/mailsystem_test/src/Plugin/Mail/DummyFormatter.phpView source
<?php
namespace Drupal\mailsystem_test\Plugin\Mail;
use Drupal\Core\Mail\MailInterface;
/**
* Provides a 'Dummy' plugin to format emails.
*
* @Mail(
* id = "mailsystem_dummyformatter",
* label = @Translation("Dummy Mailsystem formatter Plugin"),
* description = @Translation("Dummy Plugin to debug the email on formatting ,does not sending anything.")
* )
*/
class DummyFormatter implements MailInterface {
/**
* {@inheritdoc}
*/
public function format(array $message) {
// TODO: Implement format() method.
\debug([
'Subject' => $message['subject'],
'Body' => $message['body'],
'Headers' => $message['headers'],
], 'DummyFormatter: format()');
return $message;
}
/**
* {@inheritdoc}
*/
public function mail(array $message) {
return FALSE;
}
}
Classes
Name | Description |
---|---|
DummyFormatter | Provides a 'Dummy' plugin to format emails. |