Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35444005
PhabricatorConfigAllController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorConfigAllController.php
View Options
<?php
final
class
PhabricatorConfigAllController
extends
PhabricatorConfigController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$db_values
=
id
(
new
PhabricatorConfigEntry
())
->
loadAllWhere
(
'namespace = %s'
,
'default'
);
$db_values
=
mpull
(
$db_values
,
null
,
'getConfigKey'
);
$rows
=
array
();
$options
=
PhabricatorApplicationConfigOptions
::
loadAllOptions
();
ksort
(
$options
);
foreach
(
$options
as
$option
)
{
$key
=
$option
->
getKey
();
if
(
$option
->
getHidden
())
{
$value
=
phutil_tag
(
'em'
,
array
(),
pht
(
'Hidden'
));
}
else
{
$value
=
PhabricatorEnv
::
getEnvConfig
(
$key
);
$value
=
PhabricatorConfigJSON
::
prettyPrintJSON
(
$value
);
}
$db_value
=
idx
(
$db_values
,
$key
);
$rows
[]
=
array
(
phutil_tag
(
'a'
,
array
(
'href'
=>
$this
->
getApplicationURI
(
'edit/'
.
$key
.
'/'
),
),
$key
),
$value
,
$db_value
&&
!
$db_value
->
getIsDeleted
()
?
pht
(
'Customized'
)
:
''
,
);
}
$table
=
id
(
new
AphrontTableView
(
$rows
))
->
setColumnClasses
(
array
(
''
,
'wide'
,
))
->
setHeaders
(
array
(
pht
(
'Key'
),
pht
(
'Value'
),
pht
(
'Customized'
),
));
$title
=
pht
(
'Current Settings'
);
$crumbs
=
$this
->
buildApplicationCrumbs
()
->
addTextCrumb
(
$title
);
$panel
=
new
PHUIObjectBoxView
();
$panel
->
setHeaderText
(
pht
(
'Current Settings'
));
$panel
->
setTable
(
$table
);
$nav
=
$this
->
buildSideNavView
();
$nav
->
selectFilter
(
'all/'
);
$view
=
id
(
new
PHUITwoColumnView
())
->
setNavigation
(
$nav
)
->
setMainColumn
(
array
(
$panel
,
));
return
$this
->
newPage
()
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
appendChild
(
$view
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 8, 2:27 PM (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6d/a6/46a580044c04ac21417b7f1371da
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment