Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97251655
PhabricatorCalendarExternalInvitee.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
Fri, Jan 3, 19:31
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 19:31 (2 d)
Engine
blob
Format
Raw Data
Handle
23365057
Attached To
rPH Phabricator
PhabricatorCalendarExternalInvitee.php
View Options
<?php
final
class
PhabricatorCalendarExternalInvitee
extends
PhabricatorCalendarDAO
implements
PhabricatorPolicyInterface
{
protected
$name
;
protected
$nameIndex
;
protected
$uri
;
protected
$parameters
=
array
();
protected
$sourcePHID
;
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_AUX_PHID
=>
true
,
self
::
CONFIG_SERIALIZATION
=>
array
(
'parameters'
=>
self
::
SERIALIZATION_JSON
,
),
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'name'
=>
'text'
,
'nameIndex'
=>
'bytes12'
,
'uri'
=>
'text'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_name'
=>
array
(
'columns'
=>
array
(
'nameIndex'
),
'unique'
=>
true
,
),
),
)
+
parent
::
getConfiguration
();
}
public
function
getPHIDType
()
{
return
PhabricatorCalendarExternalInviteePHIDType
::
TYPECONST
;
}
public
function
save
()
{
$this
->
nameIndex
=
PhabricatorHash
::
digestForIndex
(
$this
->
getName
());
return
parent
::
save
();
}
/* -( 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
;
}
}
Event Timeline
Log In to Comment