summaryrefslogtreecommitdiff
path: root/app/php/components/UserSelection.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-03-15 22:12:52 +0100
committeremkael <emkael@tlen.pl>2016-03-15 22:12:52 +0100
commitf2459057389f7bbb751eaf325d1783c15f856ebc (patch)
treec3901e12d6242013320410f8d3dd9ed7b8598438 /app/php/components/UserSelection.php
parentcc09e963e8ef7ea093c7b13096856e5c732cd776 (diff)
* sorting user selection
Diffstat (limited to 'app/php/components/UserSelection.php')
-rw-r--r--app/php/components/UserSelection.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/php/components/UserSelection.php b/app/php/components/UserSelection.php
index 99dd2ab..681e154 100644
--- a/app/php/components/UserSelection.php
+++ b/app/php/components/UserSelection.php
@@ -50,7 +50,7 @@ class UserSelection extends TTemplateControl {
)
)
);
- return array_map(
+ $categories = array_map(
function($category) use($calendars) {
$dto = new CalendarGroupDTO();
$dto->loadRecord($category, $calendars);
@@ -58,6 +58,13 @@ class UserSelection extends TTemplateControl {
},
$categories
);
+ usort(
+ $categories,
+ function ($cat1, $cat2) {
+ return strcmp($cat1->Name, $cat2->Name);
+ }
+ );
+ return $categories;
}
return [];
}