get('langLinks'); $this->links = $langComponent->getLinks(); } public function run() { $items = []; $langs = Language::getActive(); foreach ($langs as $key => $item) { if ($item->id == Language::getCurrent()->id) { $items[ $key ] = $item->url; } else { $items[ $key ] = Html::a($item->url, $this->links[ $key ]); } } return $this->render('links', [ 'links' => $items ]); } }