Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F519744
PhabricatorPeopleAvailabilitySearchEngineAttachment.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 11, 5:58 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
111675
Default Alt Text
PhabricatorPeopleAvailabilitySearchEngineAttachment.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment