Display items on Jump Config debugger panel in alpha order

This commit is contained in:
Dale Davies
2023-04-14 11:55:35 +01:00
parent 658e92f0a8
commit bf917cd651

View File

@@ -16,11 +16,16 @@ namespace Jump\Debugger;
class JumpConfigPanel {
public static function panel(?\Throwable $e) {
if ($e === null) {
// Get all config params as an array and sort them by param name.
$configparams = (new \Jump\Config())->get_all();
ksort($configparams);
// Prepare the panel HTML, listing the config param key and value.
$content = '<pre>';
foreach ((new \Jump\Config())->get_all() as $param => $value) {
foreach ($configparams as $param => $value) {
$content .= '<b>'.$param.'</b> : '.$value.'<br>';
}
$content .= '</pre>';
// Return the panel items.
return [
'tab' => 'Jump Config',
'panel' => $content,