Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F427048
PhabricatorTokenReceiverQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
983 B
Referenced Files
None
Subscribers
None
PhabricatorTokenReceiverQuery.php
View Options
<?php
final
class
PhabricatorTokenReceiverQuery
extends
PhabricatorCursorPagedPolicyAwareQuery
{
private
$tokenCounts
;
protected
function
loadPage
()
{
$table
=
new
PhabricatorTokenCount
();
$conn_r
=
$table
->
establishConnection
(
'r'
);
$rows
=
queryfx_all
(
$conn_r
,
'SELECT objectPHID, tokenCount FROM %T ORDER BY tokenCount DESC'
,
$table
->
getTableName
());
$this
->
tokenCounts
=
ipull
(
$rows
,
'tokenCount'
,
'objectPHID'
);
return
ipull
(
$rows
,
'objectPHID'
);
}
public
function
willFilterPage
(
array
$phids
)
{
$objects
=
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$this
->
getViewer
())
->
withPHIDs
(
$phids
)
->
execute
();
// Reorder the objects in the input order.
$objects
=
array_select_keys
(
$objects
,
$phids
);
return
$objects
;
}
public
function
getTokenCounts
()
{
return
$this
->
tokenCounts
;
}
public
function
getQueryApplicationClass
()
{
return
'PhabricatorTokensApplication'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 3:50 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
58557
Default Alt Text
PhabricatorTokenReceiverQuery.php (983 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment