Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77706352
LegalpadDocumentDatasource.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
Thu, Aug 15, 23:51
Size
928 B
Mime Type
text/x-php
Expires
Sat, Aug 17, 23:51 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19910960
Attached To
rPH Phabricator
LegalpadDocumentDatasource.php
View Options
<?php
final
class
LegalpadDocumentDatasource
extends
PhabricatorTypeaheadDatasource
{
public
function
isBrowsable
()
{
// TODO: This should be made browsable.
return
false
;
}
public
function
getBrowseTitle
()
{
return
pht
(
'Browse Documents'
);
}
public
function
getPlaceholderText
()
{
return
pht
(
'Type a document name...'
);
}
public
function
getDatasourceApplicationClass
()
{
return
'PhabricatorLegalpadApplication'
;
}
public
function
loadResults
()
{
$viewer
=
$this
->
getViewer
();
$raw_query
=
$this
->
getRawQuery
();
$results
=
array
();
$documents
=
id
(
new
LegalpadDocumentQuery
())
->
setViewer
(
$viewer
)
->
execute
();
foreach
(
$documents
as
$document
)
{
$results
[]
=
id
(
new
PhabricatorTypeaheadResult
())
->
setPHID
(
$document
->
getPHID
())
->
setName
(
$document
->
getMonogram
().
' '
.
$document
->
getTitle
());
}
return
$results
;
}
}
Event Timeline
Log In to Comment