Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893011
DiffusionInternalCommitSearchEngine.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
1 KB
Referenced Files
None
Subscribers
None
DiffusionInternalCommitSearchEngine.php
View Options
<?php
final
class
DiffusionInternalCommitSearchEngine
extends
PhabricatorApplicationSearchEngine
{
public
function
getResultTypeDescription
(
)
{
return
pht
(
'Diffusion Raw Commits'
)
;
}
public
function
getApplicationClassName
(
)
{
return
PhabricatorDiffusionApplication
::
class
;
}
public
function
newQuery
(
)
{
return
new
DiffusionCommitQuery
(
)
;
}
protected
function
buildQueryFromParameters
(
array
$map
)
{
$query
=
$this
->
newQuery
(
)
;
if
(
$map
[
'repositoryPHIDs'
]
)
{
$query
->
withRepositoryPHIDs
(
$map
[
'repositoryPHIDs'
]
)
;
}
return
$query
;
}
protected
function
buildCustomSearchFields
(
)
{
return
array
(
id
(
new
PhabricatorSearchDatasourceField
(
)
)
->
setLabel
(
pht
(
'Repositories'
)
)
->
setKey
(
'repositoryPHIDs'
)
->
setDatasource
(
new
DiffusionRepositoryFunctionDatasource
(
)
)
->
setDescription
(
pht
(
'Find commits in particular repositories.'
)
)
,
)
;
}
protected
function
getURI
(
$path
)
{
return
null
;
}
protected
function
renderResultList
(
array
$commits
,
PhabricatorSavedQuery
$query
,
array
$handles
)
{
return
null
;
}
protected
function
getObjectWireFieldsForConduit
(
$object
,
array
$field_extensions
,
array
$extension_data
)
{
$commit
=
$object
;
$viewer
=
$this
->
requireViewer
(
)
;
$repository
=
$commit
->
getRepository
(
)
;
$identifier
=
$commit
->
getCommitIdentifier
(
)
;
id
(
new
DiffusionRepositoryClusterEngine
(
)
)
->
setViewer
(
$viewer
)
->
setRepository
(
$repository
)
->
synchronizeWorkingCopyBeforeRead
(
)
;
$ref
=
id
(
new
DiffusionLowLevelCommitQuery
(
)
)
->
setRepository
(
$repository
)
->
withIdentifier
(
$identifier
)
->
execute
(
)
;
return
array
(
'ref'
=>
$ref
->
newDictionary
(
)
,
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 17:42 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127078
Default Alt Text
DiffusionInternalCommitSearchEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment