aboutsummaryrefslogtreecommitdiff
path: root/model/Subtitles.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-18 13:34:57 +0100
committerMaZderMind2016-12-18 13:34:57 +0100
commita12d86ec058bc89e6feeda6ec8cfce691269b0a9 (patch)
tree6be1f764a8addd025eb774bcd2039788a4b1873f /model/Subtitles.php
parent521f0e2e1c94538fdce65a021144180f368364d9 (diff)
parentefd0b59f8ed363e12211894d8892e4d18b198c04 (diff)
Merge branch 'master' into events/33c3
Diffstat (limited to '')
-rw-r--r--model/Subtitles.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/model/Subtitles.php b/model/Subtitles.php
index e1878f2..1d401b8 100644
--- a/model/Subtitles.php
+++ b/model/Subtitles.php
@@ -1,14 +1,25 @@
<?php
-class Subtitles extends ModelBase
+class Subtitles
{
+ private $conference;
+
+ public function __construct(Conference $conference)
+ {
+ $this->conference = $conference;
+ }
+
+ public function getConference() {
+ return $this->conference;
+ }
+
public function isEnabled() {
- return $this->has('SUBTITLES');
+ return $this->getConference()->has('SUBTITLES');
}
public function getEnabledRooms($slug) {
$rooms = [];
- foreach(Room::rooms() as $room)
+ foreach($this->getConference()->getOverview()->getRooms() as $room)
{
if($room->hasSubtitles())
$rooms[] = $room;
@@ -18,9 +29,9 @@ class Subtitles extends ModelBase
}
public function getPrimusURL() {
- return $this->get('SUBTITLES.PRIMUS_URL');
+ return $this->getConference()->get('SUBTITLES.PRIMUS_URL');
}
public function getFrontendURL() {
- return $this->get('SUBTITLES.FRONTEND_URL');
+ return $this->getConference()->get('SUBTITLES.FRONTEND_URL');
}
}