Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99620204
ManiphestLegacyTransactionQuery.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
Sat, Jan 25, 19:55
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 27, 19:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23834220
Attached To
rPH Phabricator
ManiphestLegacyTransactionQuery.php
View Options
<?php
final
class
ManiphestLegacyTransactionQuery
{
public
static
function
loadByTasks
(
PhabricatorUser
$viewer
,
array
$tasks
)
{
$xactions
=
id
(
new
ManiphestTransactionQuery
())
->
setViewer
(
$viewer
)
->
withObjectPHIDs
(
mpull
(
$tasks
,
'getPHID'
))
->
needComments
(
true
)
->
execute
();
foreach
(
$xactions
as
$key
=>
$xaction
)
{
$xactions
[
$key
]
=
ManiphestTransaction
::
newFromModernTransaction
(
$xaction
);
}
return
$xactions
;
}
public
static
function
loadByTask
(
PhabricatorUser
$viewer
,
ManiphestTask
$task
)
{
return
self
::
loadByTasks
(
$viewer
,
array
(
$task
));
}
public
static
function
loadByTransactionID
(
PhabricatorUser
$viewer
,
$xaction_id
)
{
$xaction
=
id
(
new
ManiphestTransactionPro
())->
load
(
$xaction_id
);
if
(!
$xaction
)
{
return
null
;
}
$xaction
=
id
(
new
ManiphestTransactionQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$xaction
->
getPHID
()))
->
needComments
(
true
)
->
executeOne
();
if
(
$xaction
)
{
$xaction
=
ManiphestTransaction
::
newFromModernTransaction
(
$xaction
);
}
return
$xaction
;
}
}
Event Timeline
Log In to Comment