Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90354535
PhabricatorPeopleAvailabilitySearchEngineAttachment.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
Thu, Oct 31, 21:41
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 2, 21:41 (2 d)
Engine
blob
Format
Raw Data
Handle
22061133
Attached To
rPH Phabricator
PhabricatorPeopleAvailabilitySearchEngineAttachment.php
View Options
<?php
final
class
PhabricatorPeopleAvailabilitySearchEngineAttachment
extends
PhabricatorSearchEngineAttachment
{
public
function
getAttachmentName
()
{
return
pht
(
'User Availability'
);
}
public
function
getAttachmentDescription
()
{
return
pht
(
'Get availability information for users.'
);
}
public
function
willLoadAttachmentData
(
$query
,
$spec
)
{
$query
->
needAvailability
(
true
);
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
$until
=
$object
->
getAwayUntil
();
if
(
$until
)
{
$until
=
(
int
)
$until
;
}
else
{
$until
=
null
;
}
$value
=
$object
->
getDisplayAvailability
();
if
(
$value
===
null
)
{
$value
=
PhabricatorCalendarEventInvitee
::
AVAILABILITY_AVAILABLE
;
}
$name
=
PhabricatorCalendarEventInvitee
::
getAvailabilityName
(
$value
);
$color
=
PhabricatorCalendarEventInvitee
::
getAvailabilityColor
(
$value
);
$event_phid
=
$object
->
getAvailabilityEventPHID
();
return
array
(
'value'
=>
$value
,
'until'
=>
$until
,
'name'
=>
$name
,
'color'
=>
$color
,
'eventPHID'
=>
$event_phid
,
);
}
}
Event Timeline
Log In to Comment