1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-23 17:51:56 +02:00

Sort widgets by order (#737)

This commit is contained in:
Barry vd. Heuvel
2025-02-21 13:21:40 +01:00
committed by GitHub
parent 9d43aa42b1
commit 093b837a86

View File

@@ -1256,6 +1256,11 @@ class JavascriptRenderer
}
$controls = array_merge($widgets, $this->controls);
// Allow widgets to be sorted by order if specified
uasort($controls, function(array $control){
return $control['order'] ?? 0;
});
foreach (array_filter($controls) as $name => $options) {
$opts = array_diff_key($options, array_flip($excludedOptions));