3 final class PhabricatorPeopleAvailabilitySearchEngineAttachment
4 extends PhabricatorSearchEngineAttachment
{
6 public function getAttachmentName() {
7 return pht('User Availability');
10 public function getAttachmentDescription() {
11 return pht('Get availability information for users.');
14 public function willLoadAttachmentData($query, $spec) {
15 $query->needAvailability(true);
18 public function getAttachmentForObject($object, $data, $spec) {
20 $until = $object->getAwayUntil();
27 $value = $object->getDisplayAvailability();
28 if ($value === null) {
29 $value = PhabricatorCalendarEventInvitee
::AVAILABILITY_AVAILABLE
;
32 $name = PhabricatorCalendarEventInvitee
::getAvailabilityName($value);
33 $color = PhabricatorCalendarEventInvitee
::getAvailabilityColor($value);
35 $event_phid = $object->getAvailabilityEventPHID();
42 'eventPHID' => $event_phid,