Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F426958
PhabricatorApplicationPanelController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorApplicationPanelController.php
View Options
<?php
final
class
PhabricatorApplicationPanelController
extends
PhabricatorApplicationsController
{
private
$application
;
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$application
=
$request
->
getURIData
(
'application'
);
$panel_key
=
$request
->
getURIData
(
'panel'
);
$selected
=
id
(
new
PhabricatorApplicationQuery
())
->
setViewer
(
$viewer
)
->
withClasses
(
array
(
$application
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$selected
)
{
return
new
Aphront404Response
();
}
$panels
=
PhabricatorApplicationConfigurationPanel
::
loadAllPanelsForApplication
(
$selected
);
if
(
empty
(
$panels
[
$panel_key
]))
{
return
new
Aphront404Response
();
}
$panel
=
$panels
[
$panel_key
];
if
(!
$panel
->
shouldShowForApplication
(
$selected
))
{
return
new
Aphront404Response
();
}
$panel
->
setViewer
(
$viewer
);
$panel
->
setApplication
(
$selected
);
$this
->
application
=
$selected
;
return
$panel
->
handlePanelRequest
(
$request
,
$this
);
}
public
function
buildPanelCrumbs
(
PhabricatorApplicationConfigurationPanel
$panel
)
{
$application
=
$this
->
application
;
$crumbs
=
$this
->
buildApplicationCrumbs
();
$view_uri
=
'/applications/view/'
.
get_class
(
$application
).
'/'
;
$crumbs
->
addTextCrumb
(
$application
->
getName
(),
$view_uri
);
return
$crumbs
;
}
public
function
buildPanelPage
(
PhabricatorApplicationConfigurationPanel
$panel
,
$content
,
array
$options
)
{
return
$this
->
buildApplicationPage
(
$content
,
$options
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 3:39 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
58514
Default Alt Text
PhabricatorApplicationPanelController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment