aboutsummaryrefslogtreecommitdiff
path: root/model/Subtitles.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-10 18:26:10 +0100
committerMaZderMind2016-12-10 18:26:10 +0100
commit51ee8234fa7d8c2fbda0705563ab724746dfe9ce (patch)
treef0da1effc9f55f2f75dc57fe1ba17419d559b45b /model/Subtitles.php
parente4141027ad16565b95d64ea262e6909a64cd6e1f (diff)
parentf6c0270d40f6730fe1e1820f2866b08792df1db6 (diff)
Merge branch 'feature/27-unwind-global-config'
Diffstat (limited to 'model/Subtitles.php')
-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');
}
}