Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110715439
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
Sun, Apr 27, 18:00
Size
867 B
Mime Type
text/x-php
Expires
Tue, Apr 29, 18:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25830176
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