| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function display() |
||
| 26 | { |
||
| 27 | // prevent loading on disabled multi-language property |
||
| 28 | if ($this->multiLangEnabled !== true) { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | |||
| 32 | $items = []; |
||
| 33 | foreach (App::$Translate->getAvailableLangs() as $lang) { |
||
| 34 | $items[] = [ |
||
| 35 | 'type' => 'link', |
||
| 36 | 'link' => App::$Alias->scriptUrl . '/' . $lang . App::$Request->getPathInfo(), |
||
| 37 | 'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-'.$lang.'" />', |
||
| 38 | 'html' => true, |
||
| 39 | '!secure' => true |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | return Listing::display([ |
||
| 44 | 'type' => 'ul', |
||
| 45 | 'property' => $this->css, |
||
| 46 | 'items' => $items |
||
| 47 | ]); |
||
| 48 | } |
||
| 49 | } |