Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68503678
PhabricatorEditEngineQuery.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, Jun 27, 17:12
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jun 29, 17:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18570893
Attached To
rPH Phabricator
PhabricatorEditEngineQuery.php
View Options
<?php
final
class
PhabricatorEditEngineQuery
extends
PhabricatorCursorPagedPolicyAwareQuery
{
private
$engineKeys
;
public
function
withEngineKeys
(
array
$keys
)
{
$this
->
engineKeys
=
$keys
;
return
$this
;
}
protected
function
loadPage
()
{
$engines
=
PhabricatorEditEngine
::
getAllEditEngines
();
if
(
$this
->
engineKeys
!==
null
)
{
$engines
=
array_select_keys
(
$engines
,
$this
->
engineKeys
);
}
return
$engines
;
}
protected
function
willFilterPage
(
array
$engines
)
{
$viewer
=
$this
->
getViewer
();
foreach
(
$engines
as
$key
=>
$engine
)
{
$app_class
=
$engine
->
getEngineApplicationClass
();
if
(
$app_class
===
null
)
{
continue
;
}
$can_see
=
PhabricatorApplication
::
isClassInstalledForViewer
(
$app_class
,
$viewer
);
if
(!
$can_see
)
{
$this
->
didRejectResult
(
$engine
);
unset
(
$engines
[
$key
]);
continue
;
}
}
return
$engines
;
}
public
function
getQueryApplicationClass
()
{
return
'PhabricatorTransactionsApplication'
;
}
protected
function
getResultCursor
(
$object
)
{
return
null
;
}
}
Event Timeline
Log In to Comment