Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98042488
PhabricatorApplicationTransactionDetailController.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
Thu, Jan 9, 00:25
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 11, 00:25 (2 d)
Engine
blob
Format
Raw Data
Handle
23500920
Attached To
rPH Phabricator
PhabricatorApplicationTransactionDetailController.php
View Options
<?php
final
class
PhabricatorApplicationTransactionDetailController
extends
PhabricatorApplicationTransactionController
{
private
$objectHandle
;
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
// Users can end up on this page directly by following links in email,
// so we try to make it somewhat reasonable as a standalone page.
$viewer
=
$this
->
getViewer
();
$phid
=
$request
->
getURIData
(
'phid'
);
$xaction
=
id
(
new
PhabricatorObjectQuery
())
->
withPHIDs
(
array
(
$phid
))
->
setViewer
(
$viewer
)
->
executeOne
();
if
(!
$xaction
)
{
return
new
Aphront404Response
();
}
$details
=
$xaction
->
renderChangeDetails
(
$viewer
);
$object_phid
=
$xaction
->
getObjectPHID
();
$handles
=
$viewer
->
loadHandles
(
array
(
$object_phid
));
$handle
=
$handles
[
$object_phid
];
$this
->
objectHandle
=
$handle
;
$cancel_uri
=
$handle
->
getURI
();
if
(
$request
->
isAjax
())
{
$button_text
=
pht
(
'Done'
);
}
else
{
$button_text
=
pht
(
'Continue'
);
}
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Change Details'
))
->
setWidth
(
AphrontDialogView
::
WIDTH_FORM
)
->
setClass
(
'aphront-dialog-tab-group'
)
->
appendChild
(
$details
)
->
addCancelButton
(
$cancel_uri
,
$button_text
);
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$handle
=
$this
->
objectHandle
;
if
(
$handle
)
{
$crumbs
->
addTextCrumb
(
$handle
->
getObjectName
(),
$handle
->
getURI
());
}
return
$crumbs
;
}
}
Event Timeline
Log In to Comment