Translate extension for MediaWiki
Loading...
Searching...
No Matches
TranslateSandboxEmailJob.php
1
<?php
2
3
use MediaWiki\MediaWikiServices;
4
5
class
TranslateSandboxEmailJob
extends
Job {
6
11
public
static
function
newJob
( array $params ) {
12
return
new
self
( Title::newMainPage(), $params );
13
}
14
19
public
function
__construct
( $title, $params ) {
20
parent::__construct( __CLASS__, $title, $params );
21
}
22
23
public
function
run() {
24
$services = MediaWikiServices::getInstance();
25
$status = $services
26
->getEmailer()
27
->send(
28
[ $this->params[
'to'
] ],
29
$this->params[
'from'
],
30
$this->params[
'subj'
],
31
$this->params[
'body'
],
32
null
,
33
[
'replyTo'
=> $this->params[
'replyto'
] ]
34
);
35
36
return
$status->isOK();
37
}
38
}
TranslateSandboxEmailJob
Definition
TranslateSandboxEmailJob.php:5
TranslateSandboxEmailJob\newJob
static newJob(array $params)
Definition
TranslateSandboxEmailJob.php:11
TranslateSandboxEmailJob\__construct
__construct( $title, $params)
Definition
TranslateSandboxEmailJob.php:19
utils
TranslateSandboxEmailJob.php
Generated by
1.10.0