Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2992417
PhabricatorCalendarInviteeDatasource.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
PhabricatorCalendarInviteeDatasource.php
View Options
<?php
final
class
PhabricatorCalendarInviteeDatasource
extends
PhabricatorTypeaheadCompositeDatasource
{
public
function
getBrowseTitle
(
)
{
return
pht
(
'Browse Invitees'
)
;
}
public
function
getPlaceholderText
(
)
{
return
pht
(
'Type a user or project name, or function...'
)
;
}
public
function
getDatasourceApplicationClass
(
)
{
return
PhabricatorCalendarApplication
::
class
;
}
public
function
getComponentDatasources
(
)
{
return
array
(
new
PhabricatorCalendarInviteeUserDatasource
(
)
,
new
PhabricatorCalendarInviteeViewerFunctionDatasource
(
)
,
new
DifferentialExactUserFunctionDatasource
(
)
,
new
PhabricatorProjectDatasource
(
)
,
)
;
}
public
static
function
expandInvitees
(
PhabricatorUser
$viewer
,
array
$values
)
{
$phids
=
array
(
)
;
foreach
(
$values
as
$value
)
{
if
(
phid_get_type
(
$value
)
==
PhabricatorPeopleUserPHIDType
::
TYPECONST
)
{
$phids
[
]
=
$value
;
}
}
if
(
!
$phids
)
{
return
$values
;
}
$projects
=
id
(
new
PhabricatorProjectQuery
(
)
)
->
setViewer
(
$viewer
)
->
withMemberPHIDs
(
$phids
)
->
execute
(
)
;
foreach
(
$projects
as
$project
)
{
$values
[
]
=
$project
->
getPHID
(
)
;
}
return
$values
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 23, 09:28 (1 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1130921
Default Alt Text
PhabricatorCalendarInviteeDatasource.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment