Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96233658
PhabricatorTokenReceiverQuery.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
Tue, Dec 24, 00:55
Size
983 B
Mime Type
text/x-php
Expires
Thu, Dec 26, 00:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23146263
Attached To
rPH Phabricator
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'
;
}
}
Event Timeline
Log In to Comment