2015-12-20 14:29:09 +00:00
|
|
|
<?php
|
|
|
|
|
2016-12-10 17:22:34 +00:00
|
|
|
class Subtitles
|
2015-12-20 14:29:09 +00:00
|
|
|
{
|
2016-12-10 17:22:34 +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() {
|
2016-12-10 17:22:34 +00:00
|
|
|
return $this->getConference()->has('SUBTITLES');
|
2015-12-20 14:29:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getEnabledRooms($slug) {
|
|
|
|
$rooms = [];
|
2016-12-10 17:22:34 +00:00
|
|
|
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() {
|
2016-12-10 17:22:34 +00:00
|
|
|
return $this->getConference()->get('SUBTITLES.PRIMUS_URL');
|
2015-12-20 14:29:09 +00:00
|
|
|
}
|
|
|
|
public function getFrontendURL() {
|
2016-12-10 17:22:34 +00:00
|
|
|
return $this->getConference()->get('SUBTITLES.FRONTEND_URL');
|
2015-12-20 14:29:09 +00:00
|
|
|
}
|
|
|
|
}
|