aboutsummaryrefslogtreecommitdiff
path: root/model/RoomSelection.php
diff options
context:
space:
mode:
authorBenjamin Peter2017-12-12 14:07:49 +0100
committerGitHub2017-12-12 14:07:49 +0100
commit3229c9e8af148575d87b4dfbd878ffb300a2ddd2 (patch)
tree52a824f118f99f14d7079d2c05e9f3035350e1ee /model/RoomSelection.php
parent65397e5734b1439df4d68be40ffe994f26e551ec (diff)
parent0b73843d5e0d0ac22a46db28090e707566668ae4 (diff)
Merge pull request #56 from voc/feature/multitranslations
Feature/multitranslations
Diffstat (limited to 'model/RoomSelection.php')
-rw-r--r--model/RoomSelection.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/model/RoomSelection.php b/model/RoomSelection.php
index 9211c31..c21ea7e 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()