mirror of
https://github.com/voc/streaming-website
synced 2024-11-15 00:47:14 +00:00
37 lines
708 B
PHP
37 lines
708 B
PHP
<?php
|
|
|
|
class Subtitles
|
|
{
|
|
private $conference;
|
|
|
|
public function __construct(Conference $conference)
|
|
{
|
|
$this->conference = $conference;
|
|
}
|
|
|
|
public function getConference() {
|
|
return $this->conference;
|
|
}
|
|
|
|
public function isEnabled() {
|
|
return $this->getConference()->has('SUBTITLES');
|
|
}
|
|
|
|
public function getEnabledRooms($slug) {
|
|
$rooms = [];
|
|
foreach($this->getConference()->getOverview()->getRooms() as $room)
|
|
{
|
|
if($room->hasSubtitles())
|
|
$rooms[] = $room;
|
|
}
|
|
|
|
return $rooms;
|
|
}
|
|
|
|
public function getPrimusURL() {
|
|
return $this->getConference()->get('SUBTITLES.PRIMUS_URL');
|
|
}
|
|
public function getFrontendURL() {
|
|
return $this->getConference()->get('SUBTITLES.FRONTEND_URL');
|
|
}
|
|
}
|