14 parent::__construct(
'deletePage',
$params );
16 $this->title = Title::makeTitle(
$params[
'namespace'],
$params[
'title'] );
19 public function run() {
20 $services = MediaWikiServices::getInstance();
23 $wikiPage = $services->getWikiPageFactory()->newFromID( $this->params[
'wikiPageId'] );
25 $deletePage = $services->getDeletePageFactory()->newDeletePage(
27 $services->getUserFactory()->newFromId( $this->params[
'userId'] )
30 ->setSuppress( $this->params[
'suppress'] )
31 ->setTags( json_decode( $this->params[
'tags'] ) )
32 ->setLogSubtype( $this->params[
'logsubtype'] )
33 ->setDeletionAttempted()
37 $this->params[
'pageRole'] ?? DeletePage::PAGE_BASE,
38 $this->params[
'reason'],
__construct(array $params)
Class to both describe a background job and handle jobs.
array $params
Array of job parameters.
getRequestId()
string|null Id of the request that created this job. Follows jobs recursively, allowing to track the ...
Backend logic for performing a page delete action.
Interface for generic jobs only uses the parameters field and are JSON serializable.