Page MenuHomeDevCentral

FirePhabricatorNotification.php
No OneTemporary

FirePhabricatorNotification.php

<?php
namespace Nasqueron\Notifications\Jobs;
use Nasqueron\Notifications\Events\NotificationEvent;
use Nasqueron\Notifications\Events\PhabricatorPayloadEvent;
use Nasqueron\Notifications\Notifications\PhabricatorNotification;
use Illuminate\Support\Facades\Event;
class FirePhabricatorNotification extends Job {
/**
* @var PhabricatorPayloadEvent
*/
private $event;
/**
* Initializes a new instance of FirePhabricatorNotification
*
* @param PhabricatorPayloadEvent $event The event to notify
*/
public function __construct (PhabricatorPayloadEvent $event) {
$this->event = $event;
}
///
/// Task
///
/**
* Executes the job.
*/
public function handle() : void {
$notification = $this->createNotification();
Event::dispatch(new NotificationEvent($notification));
}
protected function createNotification() : PhabricatorNotification {
return new PhabricatorNotification(
$this->event->door, // Project
$this->event->story // Story
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Nov 1, 18:08 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3121705
Default Alt Text
FirePhabricatorNotification.php (1 KB)

Event Timeline