Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67562251
PhabricatorConfigListController.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
Sun, Jun 23, 02:25
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jun 25, 02:25 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18430232
Attached To
rPH Phabricator
PhabricatorConfigListController.php
View Options
<?php
final
class
PhabricatorConfigListController
extends
PhabricatorConfigController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$nav
=
$this
->
buildSideNavView
();
$nav
->
selectFilter
(
'/'
);
$groups
=
PhabricatorApplicationConfigOptions
::
loadAll
();
$list
=
$this
->
buildConfigOptionsList
(
$groups
);
$title
=
pht
(
'Phabricator Configuration'
);
$header
=
id
(
new
PhabricatorHeaderView
())
->
setHeader
(
$title
);
$nav
->
appendChild
(
array
(
$header
,
$list
,
));
$crumbs
=
$this
->
buildApplicationCrumbs
()
->
addCrumb
(
id
(
new
PhabricatorCrumbView
())
->
setName
(
pht
(
'Config'
))
->
setHref
(
$this
->
getApplicationURI
()));
$nav
->
setCrumbs
(
$crumbs
);
return
$this
->
buildApplicationPage
(
$nav
,
array
(
'title'
=>
$title
,
'device'
=>
true
,
'dust'
=>
true
,
));
}
private
function
buildConfigOptionsList
(
array
$groups
)
{
assert_instances_of
(
$groups
,
'PhabricatorApplicationConfigOptions'
);
$list
=
new
PhabricatorObjectItemListView
();
$list
->
setStackable
();
$groups
=
msort
(
$groups
,
'getName'
);
foreach
(
$groups
as
$group
)
{
$item
=
id
(
new
PhabricatorObjectItemView
())
->
setHeader
(
$group
->
getName
())
->
setHref
(
'/config/group/'
.
$group
->
getKey
().
'/'
)
->
addAttribute
(
$group
->
getDescription
());
$list
->
addItem
(
$item
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment