Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91171848
PhabricatorApplicationTransactionWarningResponse.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
Fri, Nov 8, 15:19
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 10, 15:19 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22211670
Attached To
rPH Phabricator
PhabricatorApplicationTransactionWarningResponse.php
View Options
<?php
final
class
PhabricatorApplicationTransactionWarningResponse
extends
AphrontProxyResponse
{
private
$viewer
;
private
$exception
;
private
$cancelURI
;
public
function
setCancelURI
(
$cancel_uri
)
{
$this
->
cancelURI
=
$cancel_uri
;
return
$this
;
}
public
function
setException
(
PhabricatorApplicationTransactionWarningException
$exception
)
{
$this
->
exception
=
$exception
;
return
$this
;
}
protected
function
buildProxy
()
{
return
new
AphrontDialogResponse
();
}
public
function
reduceProxyResponse
()
{
$request
=
$this
->
getRequest
();
$title
=
pht
(
'Warning: Unexpected Effects'
);
$head
=
pht
(
'This is a draft revision that will not publish any notifications '
.
'until the author requests review.'
);
$tail
=
pht
(
'Mentioned or subscribed users will not be notified.'
);
$continue
=
pht
(
'Tell No One'
);
$dialog
=
id
(
new
AphrontDialogView
())
->
setViewer
(
$request
->
getViewer
())
->
setTitle
(
$title
);
$dialog
->
appendParagraph
(
$head
);
$dialog
->
appendParagraph
(
$tail
);
$passthrough
=
$request
->
getPassthroughRequestParameters
();
foreach
(
$passthrough
as
$key
=>
$value
)
{
$dialog
->
addHiddenInput
(
$key
,
$value
);
}
$dialog
->
addHiddenInput
(
'editEngine.warnings'
,
1
)
->
addSubmitButton
(
$continue
)
->
addCancelButton
(
$this
->
cancelURI
);
return
$this
->
getProxy
()->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment