diff options
author | Benjamin Peter | 2017-12-09 23:44:47 +0100 |
---|---|---|
committer | dedeibel | 2017-12-10 18:25:21 +0100 |
commit | be515f5150f20c773371f680efad58f2d0fcaaf0 (patch) | |
tree | 2035fa3a60399686b6c5f6e381124be68c5c667e /model/RoomSelection.php | |
parent | 65397e5734b1439df4d68be40ffe994f26e551ec (diff) |
Added multple translation tracks with configurable endpoints and labels
Diffstat (limited to '')
-rw-r--r-- | model/RoomSelection.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/model/RoomSelection.php b/model/RoomSelection.php index 9211c31..a83b5c6 100644 --- a/model/RoomSelection.php +++ b/model/RoomSelection.php @@ -18,20 +18,24 @@ class RoomSelection return $this->selection; } - public function getLink() - { + private function getSelectionPath() { $path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()]; $selection = $this->getRoom()->getSelectionNames(); - if($selection[0] != $this->getSelection()) + if ($selection[0] != $this->getSelection()) $path[] = $this->getSelection(); - return joinpath($path).url_params(); + return joinpath($path); + } + + public function getLink() + { + return $this->getSelectionPath() . url_params(); } - public function getTranslatedLink() + public function getTranslatedLink($translation_endpoint) { - return joinpath([$this->getLink(), 'translated']); + return joinpath([$this->getSelectionPath(), 'i18n', $translation_endpoint]) . url_params(); } public function getDisplay() |