Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111580947
PhabricatorApplicationTransactionResponse.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, May 3, 12:28
Size
1 KB
Mime Type
text/x-php
Expires
Mon, May 5, 12:28 (2 d)
Engine
blob
Format
Raw Data
Handle
25890819
Attached To
rPH Phabricator
PhabricatorApplicationTransactionResponse.php
View Options
<?php
final
class
PhabricatorApplicationTransactionResponse
extends
AphrontProxyResponse
{
private
$viewer
;
private
$transactions
;
private
$anchorOffset
;
private
$isPreview
;
private
$isDetailView
;
protected
function
buildProxy
()
{
return
new
AphrontAjaxResponse
();
}
public
function
setAnchorOffset
(
$anchor_offset
)
{
$this
->
anchorOffset
=
$anchor_offset
;
return
$this
;
}
public
function
getAnchorOffset
()
{
return
$this
->
anchorOffset
;
}
public
function
setTransactions
(
$transactions
)
{
assert_instances_of
(
$transactions
,
'PhabricatorApplicationTransaction'
);
$this
->
transactions
=
$transactions
;
return
$this
;
}
public
function
getTransactions
()
{
return
$this
->
transactions
;
}
public
function
setViewer
(
PhabricatorUser
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
public
function
getViewer
()
{
return
$this
->
viewer
;
}
public
function
setIsPreview
(
$is_preview
)
{
$this
->
isPreview
=
$is_preview
;
return
$this
;
}
public
function
setIsDetailView
(
$is_detail_view
)
{
$this
->
isDetailView
=
$is_detail_view
;
return
$this
;
}
public
function
reduceProxyResponse
()
{
if
(
$this
->
getTransactions
())
{
$view
=
head
(
$this
->
getTransactions
())
->
getApplicationTransactionViewObject
();
}
else
{
$view
=
new
PhabricatorApplicationTransactionView
();
}
$view
->
setUser
(
$this
->
getViewer
())
->
setTransactions
(
$this
->
getTransactions
())
->
setIsPreview
(
$this
->
isPreview
)
->
setIsDetailView
(
$this
->
isDetailView
);
if
(
$this
->
getAnchorOffset
())
{
$view
->
setAnchorOffset
(
$this
->
getAnchorOffset
());
}
if
(
$this
->
isPreview
)
{
$xactions
=
mpull
(
$view
->
buildEvents
(),
'render'
);
}
else
{
$xactions
=
mpull
(
$view
->
buildEvents
(),
'render'
,
'getTransactionPHID'
);
}
$content
=
array
(
'xactions'
=>
$xactions
,
'spacer'
=>
PhabricatorTimelineView
::
renderSpacer
(),
);
return
$this
->
getProxy
()->
setContent
(
$content
);
}
}
Event Timeline
Log In to Comment