Page MenuHomeWickedGov Phorge

NotificationJob.php
No OneTemporary

Size
908 B
Referenced Files
None
Subscribers
None

NotificationJob.php

<?php
namespace MediaWiki\Extension\Notifications\Jobs;
use MediaWiki\Extension\Notifications\Controller\NotificationController;
use MediaWiki\Extension\Notifications\Mapper\EventMapper;
use MediaWiki\Extension\Notifications\Model\Event;
use MediaWiki\JobQueue\Job;
use MediaWiki\Title\Title;
class NotificationJob extends Job {
public function __construct( Title $title, array $params ) {
$command = isset( $params['jobReleaseTimestamp'] ) ? 'DelayedEchoNotificationJob' : 'EchoNotificationJob';
parent::__construct( $command, $title, $params );
}
/** @inheritDoc */
public function run() {
if ( isset( $this->params['eventId'] ) ) {
$eventMapper = new EventMapper();
$event = $eventMapper->fetchById( $this->params['eventId'], true );
} else {
$event = Event::newFromArray( $this->params['eventData'] );
}
NotificationController::notify( $event, false );
return true;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Nov 23, 15:46 (6 d, 20 s ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
04/74/745c28b88888c0df5d1b71f00388
Default Alt Text
NotificationJob.php (908 B)

Event Timeline