Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113168367
PhabricatorConfigAllController.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
Thu, May 15, 18:16
Size
1 KB
Mime Type
text/x-php
Expires
Sat, May 17, 18:16 (2 d)
Engine
blob
Format
Raw Data
Handle
26178571
Attached To
rPH Phabricator
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
)
->
setBorder
(
true
);
$header
=
id
(
new
PHUIHeaderView
())
->
setHeader
(
$title
)
->
setProfileHeader
(
true
);
$nav
=
$this
->
buildSideNavView
();
$nav
->
selectFilter
(
'all/'
);
$content
=
id
(
new
PhabricatorConfigPageView
())
->
setHeader
(
$header
)
->
setContent
(
$table
);
return
$this
->
newPage
()
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
setNavigation
(
$nav
)
->
appendChild
(
$content
)
->
addClass
(
'white-background'
);
}
}
Event Timeline
Log In to Comment