Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106759087
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
Mon, Mar 31, 04:47
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Apr 2, 04:47 (2 d)
Engine
blob
Format
Raw Data
Handle
25268171
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