Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d3f58a52
Commit
d3f58a52
authored
Nov 26, 2014
by
Nathaniel Catchpole
Browse files
Issue
#2359453
by JeroenT: Remove drupal_mail_system()
parent
9e163fc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/includes/mail.inc
View file @
d3f58a52
...
...
@@ -122,28 +122,3 @@
function
drupal_mail
(
$module
,
$key
,
$to
,
$langcode
,
$params
=
array
(),
$reply
=
NULL
,
$send
=
TRUE
)
{
return
\
Drupal
::
service
(
'plugin.manager.mail'
)
->
mail
(
$module
,
$key
,
$to
,
$langcode
,
$params
,
$reply
,
$send
);
}
/**
* Returns an instance of the mail plugin to use for a given message ID.
*
* @param string $module
* The module name which was used by drupal_mail() to invoke hook_mail().
* @param string $key
* A key to identify the email sent. The final message ID for the email
* alter hook in drupal_mail() would have been {$module}_{$key}.
*
* @return \Drupal\Core\Mail\MailInterface
* A mail plugin instance.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
*
* @see \Drupal\Core\Mail\MailManager::getInstance()
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('plugin.manager.mail')->getInstance() in procedural
* code. In Object-Oriented code inject the 'plugin.manager.mail' service and
* use the ::getInstance() method.
*/
function
drupal_mail_system
(
$module
,
$key
)
{
return
\
Drupal
::
service
(
'plugin.manager.mail'
)
->
getInstance
(
array
(
'module'
=>
$module
,
'key'
=>
$key
));
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment