blob: cd9e3555e40a02967c085cda6e2fb67da097e8d8 (
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
38
39
40
41
42
43
44
45
46
47
|
<?php
class RoomTab
{
public function __construct(Room $room, $tab)
{
$this->room = $room;
$this->tab = $tab;
}
public function getRoom()
{
return $this->room;
}
public function getTab()
{
return $this->tab;
}
public function getLink()
{
$path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()];
$tabs = $this->getRoom()->getTabNames();
if($tabs[0] != $this->getTab())
$path[] = $this->getTab();
return joinpath($path).url_params();
}
public function getDisplay()
{
$tab = $this->getTab();
switch($tab)
{
case 'music':
return 'Radio';
case 'dash':
return 'Adaptive Quality Video';
default:
return ucfirst($tab);
}
}
}
|