Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892397
HarbormasterBuildPlanDatasource.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
993 B
Referenced Files
None
Subscribers
None
HarbormasterBuildPlanDatasource.php
View Options
<?php
final
class
HarbormasterBuildPlanDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
getBrowseTitle
(
)
{
return
pht
(
'Browse Build Plans'
)
;
}
public
function
getPlaceholderText
(
)
{
return
pht
(
'Type a build plan name...'
)
;
}
public
function
getDatasourceApplicationClass
(
)
{
return
PhabricatorHarbormasterApplication
::
class
;
}
public
function
loadResults
(
)
{
$viewer
=
$this
->
getViewer
(
)
;
$raw_query
=
$this
->
getRawQuery
(
)
;
$results
=
array
(
)
;
$query
=
id
(
new
HarbormasterBuildPlanQuery
(
)
)
->
setOrder
(
'name'
)
->
withDatasourceQuery
(
$raw_query
)
;
$plans
=
$this
->
executeQuery
(
$query
)
;
foreach
(
$plans
as
$plan
)
{
$closed
=
null
;
if
(
$plan
->
isDisabled
(
)
)
{
$closed
=
pht
(
'Disabled'
)
;
}
$results
[
]
=
id
(
new
PhabricatorTypeaheadResult
(
)
)
->
setName
(
$plan
->
getName
(
)
)
->
setClosed
(
$closed
)
->
setPHID
(
$plan
->
getPHID
(
)
)
;
}
return
$results
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 16:45 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126610
Default Alt Text
HarbormasterBuildPlanDatasource.php (993 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment