aboutsummaryrefslogtreecommitdiff
path: root/model/Subtitles.php
blob: 1d401b8f3d37f194167c7ab85ff75da70ac9a089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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');
	}
}