Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F9790212
FirePhabricatorNotification.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
FirePhabricatorNotification.php
View Options
<?php
namespace
Nasqueron\Notifications\Jobs
;
use
Nasqueron\Notifications\Notifications\PhabricatorNotification
;
use
Nasqueron\Notifications\Events\PhabricatorPayloadEvent
;
use
Nasqueron\Notifications\Events\NotificationEvent
;
use
Nasqueron\Notifications\Jobs\Job
;
use
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.
*
* @return void
*/
public
function
handle
()
{
$notification
=
$this
->
createNotification
();
Event
::
fire
(
new
NotificationEvent
(
$notification
));
}
/**
* Creates a Phabricator notification
*
* @param PhabricatorPayloadEvent $event
* @return Notification the notification
*/
protected
function
createNotification
()
{
return
new
PhabricatorNotification
(
$this
->
event
->
door
,
// Project
$this
->
event
->
story
// Story
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 16, 00:07 (3 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683508
Default Alt Text
FirePhabricatorNotification.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment