Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107915846
PhabricatorCalendarEventEndDateTransaction.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, Apr 11, 21:07
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Apr 13, 21:07 (2 d)
Engine
blob
Format
Raw Data
Handle
25497740
Attached To
rPH Phabricator
PhabricatorCalendarEventEndDateTransaction.php
View Options
<?php
final
class
PhabricatorCalendarEventEndDateTransaction
extends
PhabricatorCalendarEventDateTransaction
{
const
TRANSACTIONTYPE
=
'calendar.enddate'
;
public
function
generateOldValue
(
$object
)
{
// TODO: Upgrade this.
return
$object
->
getEndDateTimeEpoch
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$actor
=
$this
->
getActor
();
// TODO: DEPRECATED.
$object
->
setDateTo
(
$value
);
$object
->
setAllDayDateTo
(
$object
->
getDateEpochForTimezone
(
$value
,
$actor
->
getTimeZone
(),
'Y-m-d 23:59:00'
,
null
,
new
DateTimeZone
(
'UTC'
)));
$datetime
=
PhutilCalendarAbsoluteDateTime
::
newFromEpoch
(
$value
,
$actor
->
getTimezoneIdentifier
());
$datetime
->
setIsAllDay
(
$object
->
getIsAllDay
());
$object
->
setEndDateTime
(
$datetime
);
}
public
function
getTitle
()
{
return
pht
(
'%s changed the end date for this event from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderOldDate
(),
$this
->
renderNewDate
());
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s changed the end date for %s from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderOldDate
(),
$this
->
renderNewDate
());
}
protected
function
getInvalidDateMessage
()
{
return
pht
(
'End date is invalid.'
);
}
}
Event Timeline
Log In to Comment