Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98313103
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 11, 23:54
Size
928 B
Mime Type
text/x-php
Expires
Mon, Jan 13, 23:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23555269
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
isInheritedEdit
()
{
return
false
;
}
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