Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103266204
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, Feb 28, 16:46
Size
867 B
Mime Type
text/x-php
Expires
Sun, Mar 2, 16:46 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
24530561
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