aboutsummaryrefslogtreecommitdiff
path: root/model/Conferences.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Conferences.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/model/Conferences.php b/model/Conferences.php
index 9396a48..ab7fe0e 100644
--- a/model/Conferences.php
+++ b/model/Conferences.php
@@ -33,6 +33,20 @@ class Conferences extends ModelBase
return count(Conferences::getActiveConferences());
}
+ public static function getConferencesSorted() {
+ $sorted = Conferences::getConferences();
+
+ usort($sorted, function($a, $b) {
+ return @$b['CONFIG']['CONFERENCE']['STARTS_AT'] - @$a['CONFIG']['CONFERENCE']['STARTS_AT'];
+ });
+
+ return $sorted;
+ }
+
+ public static function getLastConference() {
+ return Conferences::getConferencesSorted()[0];
+ }
+
public static function exists($mandator) {
return array_key_exists($mandator, Conferences::getConferences());
}
@@ -50,6 +64,9 @@ class Conferences extends ModelBase
'title' => $conf->getTitle(),
'description' => $conf->getDescription(),
+ 'relive' => forceslash($mandator).$conf->getReliveUrl(),
+ 'releases' => $conf->getReleasesUrl(),
+
'CONFIG' => $GLOBALS['CONFIG'],
];
unset($GLOBALS['CONFIG']);