From d8812e9750bd40af9b15d12ebbb344132f446754 Mon Sep 17 00:00:00 2001 From: stickevi Date: Mon, 13 Aug 2018 09:53:25 -0700 Subject: [PATCH] Update sorting for Service APIs to be sorted by namespace, like the sidebar. --- build/docs/classes/DocsBuilder.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/docs/classes/DocsBuilder.php b/build/docs/classes/DocsBuilder.php index c621b75c82..a6b66dd69d 100644 --- a/build/docs/classes/DocsBuilder.php +++ b/build/docs/classes/DocsBuilder.php @@ -119,7 +119,11 @@ public function build() } } - ksort($services, SORT_NATURAL | SORT_FLAG_CASE); + uasort($services, function($a, $b) { + $serviceA = current($a); + $serviceB = current($b); + return strcasecmp($serviceA->namespace, $serviceB->namespace); + }); $this->updateHomepage($services); $this->updateClients($services); $this->updateAliases($services, $aliases);