Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99036942
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
Sat, Jan 18, 15:39
Size
867 B
Mime Type
text/x-php
Expires
Mon, Jan 20, 15:39 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23695161
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