Conditions | 6 |
Paths | 7 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function getVar($type, $object, $original = false, $locale = null) |
||
37 | { |
||
38 | if ($object && is_object($object)) { |
||
39 | $lang = $this->request ? $this->request->cookies->get('hl') : $this->defaultLocale; |
||
40 | |||
41 | $new_locale = $locale; |
||
42 | if (!$locale) { |
||
43 | $new_locale = $this->request ? $this->request->get('_locale') : $lang; |
||
44 | } |
||
45 | |||
46 | $trans = $object->getVariableByLocale($type, $new_locale, $original); |
||
47 | |||
48 | return $trans; |
||
49 | } else { |
||
50 | return $type; |
||
51 | } |
||
54 |