Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109417482
PhabricatorDashboardArrangeController.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, Apr 21, 21:20
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Apr 23, 21:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25724475
Attached To
rPH Phabricator
PhabricatorDashboardArrangeController.php
View Options
<?php
final
class
PhabricatorDashboardArrangeController
extends
PhabricatorDashboardController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$dashboard
=
id
(
new
PhabricatorDashboardQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$this
->
id
))
->
needPanels
(
true
)
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$dashboard
)
{
return
new
Aphront404Response
();
}
$title
=
$dashboard
->
getName
();
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'Dashboard %d'
,
$dashboard
->
getID
()),
$this
->
getApplicationURI
(
'view/'
.
$dashboard
->
getID
().
'/'
));
$crumbs
->
addTextCrumb
(
pht
(
'Arrange'
));
$rendered_dashboard
=
id
(
new
PhabricatorDashboardRenderingEngine
())
->
setViewer
(
$viewer
)
->
setDashboard
(
$dashboard
)
->
setArrangeMode
(
true
)
->
renderDashboard
();
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$rendered_dashboard
,
),
array
(
'title'
=>
$title
,
'device'
=>
true
,
));
}
}
Event Timeline
Log In to Comment