diff options
author | MaZderMind | 2016-12-18 13:34:57 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-18 13:34:57 +0100 |
commit | a12d86ec058bc89e6feeda6ec8cfce691269b0a9 (patch) | |
tree | 6be1f764a8addd025eb774bcd2039788a4b1873f /model/Subtitles.php | |
parent | 521f0e2e1c94538fdce65a021144180f368364d9 (diff) | |
parent | efd0b59f8ed363e12211894d8892e4d18b198c04 (diff) |
Merge branch 'master' into events/33c3
Diffstat (limited to '')
-rw-r--r-- | model/Subtitles.php | 21 |
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'); } } |