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