diff --git a/core/includes/mail.inc b/core/includes/mail.inc index 9b6388b..a661e72 100644 --- a/core/includes/mail.inc +++ b/core/includes/mail.inc @@ -14,10 +14,10 @@ * and possibly email headers) and the replacement values to use in the * appropriate places in the template. Processed email templates are * requested from hook_mail() from the module sending the email. Any module - * can modify the composed email message array using hook_mail_alter(). - * Finally \Drupal::service('plugin.manager.mail')->getInstance()->mail() sends - * the email, which can be reused if the exact same composed email is to be sent - * to multiple recipients. + * can modify the composed email message array using hook_mail_alter(). Finally + * \Drupal::service('plugin.manager.mail')->getInstance()->mail() sends the + * email, which can be reused if the exact same composed email is to be sent to + * multiple recipients. * * Finding out what language to send the email with needs some consideration. * If you send email to a user, her preferred language should be fine, so diff --git a/core/lib/Drupal/Core/Mail/MailManagerInterface.php b/core/lib/Drupal/Core/Mail/MailManagerInterface.php index 0972ce3..50645ab 100644 --- a/core/lib/Drupal/Core/Mail/MailManagerInterface.php +++ b/core/lib/Drupal/Core/Mail/MailManagerInterface.php @@ -22,9 +22,9 @@ * appropriate places in the template. Processed email templates are requested * from hook_mail() from the module sending the email. Any module can modify * the composed email message array using hook_mail_alter(). Finally - * \Drupal::service('plugin.manager.mail')->mail() sends the email, - * which can be reused if the exact same composed email is to be sent to - * multiple recipients. + * \Drupal::service('plugin.manager.mail')->mail() sends the email, which can + * be reused if the exact same composed email is to be sent to multiple + * recipients. * * Finding out what language to send the email with needs some consideration. * If you send email to a user, her preferred language should be fine, so use @@ -111,8 +111,8 @@ * If TRUE, \Drupal::service('plugin.manager.mail')->mail() will call * \Drupal::service('plugin.manager.mail')->mail() to deliver the message, * and store the result in $message['result']. Modules implementing - * hook_mail_alter() may cancel sending by setting - * $message['send'] to FALSE. + * hook_mail_alter() may cancel sending by setting $message['send'] to + * FALSE. * * @return string * The $message array structure containing all details of the message. If diff --git a/core/modules/system/src/Tests/Mail/MailTest.php b/core/modules/system/src/Tests/Mail/MailTest.php index fb0727a..26cc34f 100644 --- a/core/modules/system/src/Tests/Mail/MailTest.php +++ b/core/modules/system/src/Tests/Mail/MailTest.php @@ -39,7 +39,6 @@ public function testPluggableFramework() { \Drupal::config('system.mail')->set('interface.default', 'test_php_mail_failure')->save(); // Get the default MailInterface class instance. - $mail_backend = \Drupal::service('plugin.manager.mail')->getInstance(array('module' => 'default', 'key' => 'default')); // Assert whether the default mail backend is an instance of the expected diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 0cbf698..1856f9a 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -305,10 +305,9 @@ function hook_contextual_links_plugins_alter(array &$contextual_links) { * * Email messages sent using functions other than drupal_mail() will not * invoke hook_mail_alter(). For example, a contributed module directly - * calling the \Drupal::service('plugin.manager.mail')->mail() - * or PHP mail() function will not invoke this hook. All core modules use - * drupal_mail() for messaging, it is best practice but not mandatory - * in contributed modules. + * calling the \Drupal::service('plugin.manager.mail')->mail() or PHP mail() + * function will not invoke this hook. All core modules use drupal_mail() for + * messaging, it is best practice but not mandatory in contributed modules. * * @param $message * An array containing the message data. Keys in this array include: diff --git a/core/modules/user/user.module b/core/modules/user/user.module index d6a3942..31d7054 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1290,8 +1290,8 @@ function user_role_revoke_permissions($rid, array $permissions = array()) { * language. * * @return - * The return value from \Drupal::service('plugin.manager.mail')->mail(), - * if ends up being called. + * The return value from \Drupal::service('plugin.manager.mail')->mail(), if + * ends up being called. */ function _user_mail_notify($op, $account, $langcode = NULL) { // By default, we always notify except for canceled and blocked.