Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98144655
PhabricatorCalendarEventNotificationView.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, Jan 10, 06:38
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 12, 06:38 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23515901
Attached To
rPH Phabricator
PhabricatorCalendarEventNotificationView.php
View Options
<?php
final
class
PhabricatorCalendarEventNotificationView
extends
Phobject
{
private
$viewer
;
private
$event
;
private
$epoch
;
private
$dateTime
;
public
function
setViewer
(
PhabricatorUser
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
public
function
getViewer
()
{
return
$this
->
viewer
;
}
public
function
setEvent
(
PhabricatorCalendarEvent
$event
)
{
$this
->
event
=
$event
;
return
$this
;
}
public
function
getEvent
()
{
return
$this
->
event
;
}
public
function
setEpoch
(
$epoch
)
{
$this
->
epoch
=
$epoch
;
return
$this
;
}
public
function
getEpoch
()
{
return
$this
->
epoch
;
}
public
function
setDateTime
(
PhutilCalendarDateTime
$date_time
)
{
$this
->
dateTime
=
$date_time
;
return
$this
;
}
public
function
getDateTime
()
{
return
$this
->
dateTime
;
}
public
function
getDisplayMinutes
()
{
$epoch
=
$this
->
getEpoch
();
$now
=
PhabricatorTime
::
getNow
();
$minutes
=
(
int
)
ceil
((
$epoch
-
$now
)
/
60
);
return
new
PhutilNumber
(
$minutes
);
}
public
function
getDisplayTime
()
{
$viewer
=
$this
->
getViewer
();
$epoch
=
$this
->
getEpoch
();
return
phabricator_datetime
(
$epoch
,
$viewer
);
}
}
Event Timeline
Log In to Comment