aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorMaZderMind2015-04-04 20:11:25 +0200
committerMaZderMind2015-04-04 20:12:49 +0200
commit0fb8904157ea87997fa662ad2c975d773dd75455 (patch)
tree9d3f1c505fd499f637bc4926a7feb19fffce4c5e /model
parent69c2ec30e6131a2ad205a4a1b77abcbed40c7670 (diff)
Implement Close-Down Page with Upcoming Event
Diffstat (limited to '')
-rw-r--r--model/Conference.php4
-rw-r--r--model/Upcoming.php19
2 files changed, 23 insertions, 0 deletions
diff --git a/model/Conference.php b/model/Conference.php
index e9e33a6..a4c14aa 100644
--- a/model/Conference.php
+++ b/model/Conference.php
@@ -6,6 +6,10 @@ class Conference extends ModelBase
return $this->get('CONFERENCE.TITLE', 'C3Voc Streaming');
}
+ public function isClosed() {
+ return $this->get('CONFERENCE.CLOSED');
+ }
+
public function hasAuthor() {
return $this->has('CONFERENCE.AUTHOR');
}
diff --git a/model/Upcoming.php b/model/Upcoming.php
new file mode 100644
index 0000000..6f54814
--- /dev/null
+++ b/model/Upcoming.php
@@ -0,0 +1,19 @@
+<?php
+
+class Upcoming
+{
+ public function getNextEvent()
+ {
+ try {
+ $events = file_get_contents('https://c3voc.de/eventkalender/events.json?filter=upcoming');
+ $events = json_decode($events, true);
+ $names = array_keys($events['voc_events']);
+
+ return $events['voc_events'][$names[0]];
+ }
+ catch(ErrorException $e)
+ {
+ return null;
+ }
+ }
+}