Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79786649
PhabricatorMailingListDatasource.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
Wed, Aug 28, 05:54
Size
910 B
Mime Type
text/x-php
Expires
Fri, Aug 30, 05:54 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20233205
Attached To
rPH Phabricator
PhabricatorMailingListDatasource.php
View Options
<?php
final
class
PhabricatorMailingListDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
getPlaceholderText
()
{
return
pht
(
'Type a mailing list name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorMailingListsApplication'
;
}
public
function
loadResults
()
{
$viewer
=
$this
->
getViewer
();
$raw_query
=
$this
->
getRawQuery
();
$query
=
id
(
new
PhabricatorMailingListQuery
());
$lists
=
$this
->
executeQuery
(
$query
);
$results
=
array
();
foreach
(
$lists
as
$list
)
{
$results
[]
=
id
(
new
PhabricatorTypeaheadResult
())
->
setName
(
$list
->
getName
())
->
setURI
(
$list
->
getURI
())
->
setPHID
(
$list
->
getPHID
());
}
// TODO: It would be slightly preferable to do this as part of the query,
// this is just simpler for the moment.
return
$this
->
filterResultsAgainstTokens
(
$results
);
}
}
Event Timeline
Log In to Comment