diff options
author | MaZderMind | 2015-12-20 15:29:09 +0100 |
---|---|---|
committer | MaZderMind | 2015-12-20 15:29:09 +0100 |
commit | a439f454df31093157aaa773e549f5bacc5584c1 (patch) | |
tree | fe533d042b76213d0029753a7054090a2a8c5494 /model/Subtitles.php | |
parent | 82fcef7c4cd257c0ee3b666899542e033269af32 (diff) |
implement new subtitles L2S2 interface
Diffstat (limited to 'model/Subtitles.php')
-rw-r--r-- | model/Subtitles.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/model/Subtitles.php b/model/Subtitles.php new file mode 100644 index 0000000..e1878f2 --- /dev/null +++ b/model/Subtitles.php @@ -0,0 +1,26 @@ +<?php + +class Subtitles extends ModelBase +{ + public function isEnabled() { + return $this->has('SUBTITLES'); + } + + public function getEnabledRooms($slug) { + $rooms = []; + foreach(Room::rooms() as $room) + { + if($room->hasSubtitles()) + $rooms[] = $room; + } + + return $rooms; + } + + public function getPrimusURL() { + return $this->get('SUBTITLES.PRIMUS_URL'); + } + public function getFrontendURL() { + return $this->get('SUBTITLES.FRONTEND_URL'); + } +} |