Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81820379
PhabricatorSpacesNamespaceDatasource.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
Sun, Sep 8, 02:46
Size
974 B
Mime Type
text/x-php
Expires
Tue, Sep 10, 02:46 (2 d)
Engine
blob
Format
Raw Data
Handle
20623230
Attached To
rPH Phabricator
PhabricatorSpacesNamespaceDatasource.php
View Options
<?php
final
class
PhabricatorSpacesNamespaceDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
getBrowseTitle
()
{
return
pht
(
'Browse Spaces'
);
}
public
function
getPlaceholderText
()
{
return
pht
(
'Type a space name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorSpacesApplication'
;
}
public
function
loadResults
()
{
$query
=
id
(
new
PhabricatorSpacesNamespaceQuery
());
$spaces
=
$this
->
executeQuery
(
$query
);
$results
=
array
();
foreach
(
$spaces
as
$space
)
{
$full_name
=
pht
(
'%s %s'
,
$space
->
getMonogram
(),
$space
->
getNamespaceName
());
$result
=
id
(
new
PhabricatorTypeaheadResult
())
->
setName
(
$full_name
)
->
setPHID
(
$space
->
getPHID
());
if
(
$space
->
getIsArchived
())
{
$result
->
setClosed
(
pht
(
'Archived'
));
}
$results
[]
=
$result
;
}
return
$this
->
filterResultsAgainstTokens
(
$results
);
}
}
Event Timeline
Log In to Comment