Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101160751
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, Feb 6, 08:14
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Feb 8, 08:14 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24103690
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