Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96146007
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, Dec 23, 02:49
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 02:49 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
23131788
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