Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892944
LegalpadDocumentDatasource.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
933 B
Referenced Files
None
Subscribers
None
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
::
class
;
}
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 17:36 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127025
Default Alt Text
LegalpadDocumentDatasource.php (933 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment