Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81589870
PhabricatorPackagesPackageDatasource.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 6, 22:13
Size
860 B
Mime Type
text/x-php
Expires
Sun, Sep 8, 22:13 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20597765
Attached To
rPH Phabricator
PhabricatorPackagesPackageDatasource.php
View Options
<?php
final
class
PhabricatorPackagesPackageDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
getBrowseTitle
()
{
return
pht
(
'Browse Packages'
);
}
public
function
getPlaceholderText
()
{
return
pht
(
'Type a package name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorPackagesApplication'
;
}
public
function
loadResults
()
{
$viewer
=
$this
->
getViewer
();
$raw_query
=
$this
->
getRawQuery
();
$package_query
=
id
(
new
PhabricatorPackagesPackageQuery
());
$packages
=
$this
->
executeQuery
(
$package_query
);
$results
=
array
();
foreach
(
$packages
as
$package
)
{
$results
[]
=
id
(
new
PhabricatorTypeaheadResult
())
->
setName
(
$package
->
getName
())
->
setPHID
(
$package
->
getPHID
());
}
return
$this
->
filterResultsAgainstTokens
(
$results
);
}
}
Event Timeline
Log In to Comment