streaming-website/model/Subtitles.php

38 lines
708 B
PHP
Raw Normal View History

2015-12-20 14:29:09 +00:00
<?php
class Subtitles
2015-12-20 14:29:09 +00:00
{
private $conference;
public function __construct(Conference $conference)
{
$this->conference = $conference;
}
public function getConference() {
return $this->conference;
}
2015-12-20 14:29:09 +00:00
public function isEnabled() {
return $this->getConference()->has('SUBTITLES');
2015-12-20 14:29:09 +00:00
}
public function getEnabledRooms($slug) {
$rooms = [];
foreach($this->getConference()->getOverview()->getRooms() as $room)
2015-12-20 14:29:09 +00:00
{
if($room->hasSubtitles())
$rooms[] = $room;
}
return $rooms;
}
public function getPrimusURL() {
return $this->getConference()->get('SUBTITLES.PRIMUS_URL');
2015-12-20 14:29:09 +00:00
}
public function getFrontendURL() {
return $this->getConference()->get('SUBTITLES.FRONTEND_URL');
2015-12-20 14:29:09 +00:00
}
}