Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80842910
PhabricatorDashboardDatasource.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
Mon, Sep 2, 21:20
Size
932 B
Mime Type
text/x-php
Expires
Wed, Sep 4, 21:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20460559
Attached To
rPH Phabricator
PhabricatorDashboardDatasource.php
View Options
<?php
final
class
PhabricatorDashboardDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
getBrowseTitle
()
{
return
pht
(
'Browse Dashboards'
);
}
public
function
getPlaceholderText
()
{
return
pht
(
'Type a dashboard name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorDashboardApplication'
;
}
public
function
loadResults
()
{
$query
=
id
(
new
PhabricatorDashboardQuery
());
$dashboards
=
$this
->
executeQuery
(
$query
);
$results
=
array
();
foreach
(
$dashboards
as
$dashboard
)
{
$result
=
id
(
new
PhabricatorTypeaheadResult
())
->
setName
(
$dashboard
->
getName
())
->
setPHID
(
$dashboard
->
getPHID
())
->
addAttribute
(
pht
(
'Dashboard'
));
if
(
$dashboard
->
isArchived
())
{
$result
->
setClosed
(
pht
(
'Archived'
));
}
$results
[]
=
$result
;
}
return
$this
->
filterResultsAgainstTokens
(
$results
);
}
}
Event Timeline
Log In to Comment