protected function EmailWebformHandler::getMailSystemFormatter in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformHandler/EmailWebformHandler.php \Drupal\webform\Plugin\WebformHandler\EmailWebformHandler::getMailSystemFormatter()
Get the Mail System's formatter module name.
Return value
string The Mail System's formatter module name.
File
- src/
Plugin/ WebformHandler/ EmailWebformHandler.php, line 1440
Class
- EmailWebformHandler
- Emails a webform submission.
Namespace
Drupal\webform\Plugin\WebformHandlerCode
protected function getMailSystemFormatter() {
$mailsystem_config = $this->configFactory
->get('mailsystem.settings');
// Get the default formatter.
$mailsystem_formatter = $mailsystem_config
->get('defaults.formatter');
// Look for a global setting for the webform module.
$mailsystem_formatter = $mailsystem_config
->get('modules.webform.none.formatter') ?: $mailsystem_formatter;
// Look for a specific setting for this webform module's email.
$key = 'email_' . $this
->getHandlerId();
$mailsystem_formatter = $mailsystem_config
->get("modules.webform.{$key}.formatter") ?: $mailsystem_formatter;
return $mailsystem_formatter;
}