diff options
Diffstat (limited to 'model/RoomSelection.php')
-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() |