Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82734497
DiffusionArcanistProjectDatasource.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, Sep 13, 03:41
Size
922 B
Mime Type
text/x-php
Expires
Sun, Sep 15, 03:41 (2 d)
Engine
blob
Format
Raw Data
Handle
20742910
Attached To
rPH Phabricator
DiffusionArcanistProjectDatasource.php
View Options
<?php
final
class
DiffusionArcanistProjectDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
isBrowsable
()
{
// TODO: We should probably make this browsable, or maybe remove it.
return
false
;
}
public
function
getBrowseTitle
()
{
return
pht
(
'Browse Arcanist Projects'
);
}
public
function
getPlaceholderText
()
{
return
pht
(
'Type an arcanist project name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorDiffusionApplication'
;
}
public
function
loadResults
()
{
$viewer
=
$this
->
getViewer
();
$raw_query
=
$this
->
getRawQuery
();
$results
=
array
();
$arcprojs
=
id
(
new
PhabricatorRepositoryArcanistProject
())->
loadAll
();
foreach
(
$arcprojs
as
$proj
)
{
$results
[]
=
id
(
new
PhabricatorTypeaheadResult
())
->
setName
(
$proj
->
getName
())
->
setPHID
(
$proj
->
getPHID
());
}
return
$results
;
}
}
Event Timeline
Log In to Comment