blob: d4f781bfadd8dfbc790e75041d655c0abc658c08 (
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
|
<?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()
{
$tabs = $this->getRoom()->getTabNames();
if($tabs[0] == $this->getTab())
return rawurlencode($this->getRoom()->getSlug()).'/';
return rawurlencode($this->getRoom()->getSlug()).'/'.rawurlencode($this->getTab()).'/';
}
public function getDisplay()
{
return ucfirst($this->getTab());
}
}
|