From be515f5150f20c773371f680efad58f2d0fcaaf0 Mon Sep 17 00:00:00 2001 From: Benjamin Peter Date: Sat, 9 Dec 2017 23:44:47 +0100 Subject: Added multple translation tracks with configurable endpoints and labels --- model/RoomSelection.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'model/RoomSelection.php') 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() -- cgit v1.2.3 From 0b73843d5e0d0ac22a46db28090e707566668ae4 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Mon, 11 Dec 2017 20:03:35 +0100 Subject: Leading Spaces to Tabs --- model/RoomSelection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'model/RoomSelection.php') diff --git a/model/RoomSelection.php b/model/RoomSelection.php index a83b5c6..c21ea7e 100644 --- a/model/RoomSelection.php +++ b/model/RoomSelection.php @@ -18,15 +18,15 @@ class RoomSelection return $this->selection; } - private function getSelectionPath() { + private function getSelectionPath() { $path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()]; $selection = $this->getRoom()->getSelectionNames(); if ($selection[0] != $this->getSelection()) $path[] = $this->getSelection(); - return joinpath($path); - } + return joinpath($path); + } public function getLink() { -- cgit v1.2.3