Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108712252
PhabricatorCalendarEventReplyTransaction.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 18, 03:10
Size
867 B
Mime Type
text/x-php
Expires
Sun, Apr 20, 03:10 (2 d)
Engine
blob
Format
Raw Data
Handle
25620671
Attached To
rPH Phabricator
PhabricatorCalendarEventReplyTransaction.php
View Options
<?php
abstract
class
PhabricatorCalendarEventReplyTransaction
extends
PhabricatorCalendarEventTransactionType
{
public
function
generateOldValue
(
$object
)
{
$actor_phid
=
$this
->
getActingAsPHID
();
return
$object
->
getUserInviteStatus
(
$actor_phid
);
}
public
function
applyExternalEffects
(
$object
,
$value
)
{
$acting_phid
=
$this
->
getActingAsPHID
();
$invitees
=
$object
->
getInvitees
();
$invitees
=
mpull
(
$invitees
,
null
,
'getInviteePHID'
);
$invitee
=
idx
(
$invitees
,
$acting_phid
);
if
(!
$invitee
)
{
$invitee
=
id
(
new
PhabricatorCalendarEventInvitee
())
->
setEventPHID
(
$object
->
getPHID
())
->
setInviteePHID
(
$acting_phid
)
->
setInviterPHID
(
$acting_phid
);
$invitees
[
$acting_phid
]
=
$invitee
;
}
$invitee
->
setStatus
(
$value
)
->
save
();
$object
->
attachInvitees
(
$invitees
);
}
}
Event Timeline
Log In to Comment