Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95884314
PhabricatorCalendarManagementNotifyWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Dec 20, 06:44
Size
1011 B
Mime Type
text/x-php
Expires
Sun, Dec 22, 06:44 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
23066169
Attached To
rPH Phabricator
PhabricatorCalendarManagementNotifyWorkflow.php
View Options
<?php
final
class
PhabricatorCalendarManagementNotifyWorkflow
extends
PhabricatorCalendarManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'notify'
)
->
setExamples
(
'**notify** [options]'
)
->
setSynopsis
(
pht
(
'Test and debug notifications about upcoming events.'
))
->
setArguments
(
array
(
array
(
'name'
=>
'minutes'
,
'param'
=>
'N'
,
'help'
=>
pht
(
'Notify about events in the next __N__ minutes (default: 15). '
.
'Setting this to a larger value makes testing easier.'
),
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$viewer
=
$this
->
getViewer
();
$engine
=
new
PhabricatorCalendarNotificationEngine
();
$minutes
=
$args
->
getArg
(
'minutes'
);
if
(
$minutes
)
{
$engine
->
setNotifyWindow
(
phutil_units
(
"{$minutes} minutes in seconds"
));
}
$engine
->
publishNotifications
();
return
0
;
}
}
Event Timeline
Log In to Comment