| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | public function getLinks() |
||
| 57 | { |
||
| 58 | /** @var Config $config */ |
||
| 59 | $config = $this->getServiceLocator()->get(Config::class); |
||
| 60 | $translations = $config->get('translation'); |
||
| 61 | |||
| 62 | $result = []; |
||
| 63 | $pattern = '<a rel="alternate" hreflang="%s" class="lang %s" href="?lang=%s">%s</a>'; |
||
| 64 | |||
| 65 | foreach ($translations as $key => $content) { |
||
| 66 | $result[] = sprintf($pattern, strtolower($key), strtolower($key), $key, $this->languageTextMapping[$key]); |
||
| 67 | } |
||
| 68 | |||
| 69 | return implode('', $result); |
||
| 70 | } |
||
| 71 | |||
| 72 | } |