Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/storage/PhabricatorCalendarEvent.php
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | public function getInvitees() { | ||||
return $this->assertAttached($this->invitees); | return $this->assertAttached($this->invitees); | ||||
} | } | ||||
public function attachInvitees(array $invitees) { | public function attachInvitees(array $invitees) { | ||||
$this->invitees = $invitees; | $this->invitees = $invitees; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getInviteePHIDsForEdit() { | |||||
$invitees = array(); | |||||
foreach ($this->getInvitees() as $invitee) { | |||||
if ($invitee->isUninvited()) { | |||||
continue; | |||||
} | |||||
$invitees[] = $invitee->getInviteePHID(); | |||||
} | |||||
return $invitees; | |||||
} | |||||
public function getUserInviteStatus($phid) { | public function getUserInviteStatus($phid) { | ||||
$invitees = $this->getInvitees(); | $invitees = $this->getInvitees(); | ||||
$invitees = mpull($invitees, null, 'getInviteePHID'); | $invitees = mpull($invitees, null, 'getInviteePHID'); | ||||
$invited = idx($invitees, $phid); | $invited = idx($invitees, $phid); | ||||
if (!$invited) { | if (!$invited) { | ||||
return PhabricatorCalendarEventInvitee::STATUS_UNINVITED; | return PhabricatorCalendarEventInvitee::STATUS_UNINVITED; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines |