Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93947700
PhabricatorApplicationTransactionValidationResponse.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 2, 18:27
Size
1016 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 18:27 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22718253
Attached To
rPH Phabricator
PhabricatorApplicationTransactionValidationResponse.php
View Options
<?php
final
class
PhabricatorApplicationTransactionValidationResponse
extends
AphrontProxyResponse
{
private
$viewer
;
private
$exception
;
private
$cancelURI
;
public
function
setCancelURI
(
$cancel_uri
)
{
$this
->
cancelURI
=
$cancel_uri
;
return
$this
;
}
public
function
setException
(
PhabricatorApplicationTransactionValidationException
$exception
)
{
$this
->
exception
=
$exception
;
return
$this
;
}
protected
function
buildProxy
()
{
return
new
AphrontDialogResponse
();
}
public
function
reduceProxyResponse
()
{
$request
=
$this
->
getRequest
();
$ex
=
$this
->
exception
;
$title
=
pht
(
'Validation Errors'
);
$dialog
=
id
(
new
AphrontDialogView
())
->
setUser
(
$request
->
getUser
())
->
setTitle
(
$title
);
$list
=
array
();
foreach
(
$ex
->
getErrors
()
as
$error
)
{
$list
[]
=
$error
->
getMessage
();
}
$dialog
->
appendList
(
$list
);
$dialog
->
addCancelButton
(
$this
->
cancelURI
);
return
$this
->
getProxy
()->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment