Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91111780
PhabricatorMetaMTAViewController.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, 00:52
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 10, 00:52 (2 d)
Engine
blob
Format
Raw Data
Handle
22197476
Attached To
rPH Phabricator
PhabricatorMetaMTAViewController.php
View Options
<?php
final
class
PhabricatorMetaMTAViewController
extends
PhabricatorMetaMTAController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$mail
=
id
(
new
PhabricatorMetaMTAMail
())->
load
(
$this
->
id
);
if
(!
$mail
)
{
return
new
Aphront404Response
();
}
$status
=
PhabricatorMetaMTAMail
::
getReadableStatus
(
$mail
->
getStatus
());
$form
=
new
AphrontFormView
();
$form
->
setUser
(
$request
->
getUser
());
$form
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Subject'
))
->
setValue
(
$mail
->
getSubject
()))
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Created'
))
->
setValue
(
phabricator_datetime
(
$mail
->
getDateCreated
(),
$user
)))
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Status'
))
->
setValue
(
$status
))
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Retry Count'
))
->
setValue
(
$mail
->
getRetryCount
()))
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Message'
))
->
setValue
(
$mail
->
getMessage
()))
->
appendChild
(
id
(
new
AphrontFormStaticControl
())
->
setLabel
(
pht
(
'Related PHID'
))
->
setValue
(
$mail
->
getRelatedPHID
()))
->
appendChild
(
id
(
new
AphrontFormSubmitControl
())
->
addCancelButton
(
$this
->
getApplicationURI
(),
pht
(
'Done'
)));
$panel
=
new
AphrontPanelView
();
$panel
->
setHeader
(
pht
(
'View Email'
));
$panel
->
appendChild
(
$form
);
$panel
->
setWidth
(
AphrontPanelView
::
WIDTH_WIDE
);
$panel
->
setNoBackground
();
return
$this
->
buildApplicationPage
(
$panel
,
array
(
'title'
=>
pht
(
'View Mail'
),
'device'
=>
true
,
));
}
}
Event Timeline
Log In to Comment