Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293239

Deprecate all of mail.inc, move drupal_mail to method on Mail plugin manager

$
0
0

Problem/Motivation

We're calling out to procedural code from OO stuff to use drupal_mail, eg Drupal\contact\MessageForm.

Proposed resolution

Move drupal_mail to MailManager::mail
Move all the other mail.inc stuff to a new \Drupal\Core\Utility\Mail class.
We can't make it a component because it needs Settings and references base_url global.

Remaining tasks

Fix any failing tests
Reviews

User interface changes

None

API changes

  1. drupal_mail() » \Drupal::service('plugin.manager.mail')->mail()
  2. drupal_mail_system() » \Drupal::service('plugin.manager.mail')->getInstance()
  3. drupal_wrap_mail() » \Drupal\Core\Utility\Mail::wrapMail()
  4. drupal_html_to_text() » \Drupal\Core\Utility\Mail::htmlToText()
  5. _drupal_wrap_mail_line() » \Drupal\Core\Utility\Mail::wrapMailLine()
  6. _drupal_html_to_mail_urls() » \Drupal\Core\Utility\Mail::htmlToMailUrls()
  7. _drupal_html_to_text_clean() » \Drupal\Core\Utility\Mail::htmlToTextClean()
  8. _drupal_html_to_text_pad() » \Drupal\Core\Utility\Mail::htmlToTextPad()

Viewing all articles
Browse latest Browse all 293239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>