Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4852263
PhabricatorCalendarEventInvitee.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorCalendarEventInvitee.php
View Options
<?php
final
class
PhabricatorCalendarEventInvitee
extends
PhabricatorCalendarDAO
implements
PhabricatorPolicyInterface
{
protected
$eventPHID
;
protected
$inviteePHID
;
protected
$inviterPHID
;
protected
$status
;
const
STATUS_INVITED
=
'invited'
;
const
STATUS_ATTENDING
=
'attending'
;
const
STATUS_DECLINED
=
'declined'
;
const
STATUS_UNINVITED
=
'uninvited'
;
public
static
function
initializeNewCalendarEventInvitee
(
PhabricatorUser
$actor
,
$event
)
{
return
id
(
new
PhabricatorCalendarEventInvitee
(
)
)
->
setInviterPHID
(
$actor
->
getPHID
(
)
)
->
setStatus
(
self
::
STATUS_INVITED
)
->
setEventPHID
(
$event
->
getPHID
(
)
)
;
}
protected
function
getConfiguration
(
)
{
return
array
(
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'status'
=>
'text64'
,
)
,
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_event'
=>
array
(
'columns'
=>
array
(
'eventPHID'
,
'inviteePHID'
)
,
'unique'
=>
true
,
)
,
'key_invitee'
=>
array
(
'columns'
=>
array
(
'inviteePHID'
)
,
)
,
)
,
)
+
parent
::
getConfiguration
(
)
;
}
public
function
isAttending
(
)
{
return
(
$this
->
getStatus
(
)
==
self
::
STATUS_ATTENDING
)
;
}
public
function
isUninvited
(
)
{
if
(
$this
->
getStatus
(
)
==
self
::
STATUS_UNINVITED
)
{
return
true
;
}
else
{
return
false
;
}
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
(
)
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
)
;
}
public
function
getPolicy
(
$capability
)
{
switch
(
$capability
)
{
case
PhabricatorPolicyCapability
::
CAN_VIEW
:
return
PhabricatorPolicies
::
getMostOpenPolicy
(
)
;
}
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 9, 06:22 (23 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1760323
Default Alt Text
PhabricatorCalendarEventInvitee.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment