Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100491600
PhabricatorCalendarEventUntilDateTransaction.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 31, 05:36
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Feb 2, 05:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23977193
Attached To
rPH Phabricator
PhabricatorCalendarEventUntilDateTransaction.php
View Options
<?php
final
class
PhabricatorCalendarEventUntilDateTransaction
extends
PhabricatorCalendarEventDateTransaction
{
const
TRANSACTIONTYPE
=
'calendar.recurrenceenddate'
;
public
function
generateOldValue
(
$object
)
{
$editor
=
$this
->
getEditor
();
$until
=
$object
->
newUntilDateTime
();
if
(!
$until
)
{
return
null
;
}
return
$until
->
newAbsoluteDateTime
()
->
setIsAllDay
(
$editor
->
getOldIsAllDay
())
->
toDictionary
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$actor
=
$this
->
getActor
();
$editor
=
$this
->
getEditor
();
if
(
$value
)
{
$datetime
=
PhutilCalendarAbsoluteDateTime
::
newFromDictionary
(
$value
);
$datetime
->
setIsAllDay
(
$editor
->
getNewIsAllDay
());
$object
->
setUntilDateTime
(
$datetime
);
}
else
{
$object
->
setUntilDateTime
(
null
);
}
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s changed this event to repeat until %s.'
,
$this
->
renderAuthor
(),
$this
->
renderNewDate
());
}
else
{
return
pht
(
'%s changed this event to repeat forever.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s changed %s to repeat until %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderNewDate
());
}
else
{
return
pht
(
'%s changed %s to repeat forever.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
protected
function
getInvalidDateMessage
()
{
return
pht
(
'Repeat until date is invalid.'
);
}
}
Event Timeline
Log In to Comment