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:
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user