Skip to content

Commit

Permalink
Fix bad link in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafal Marguzewicz committed Dec 8, 2019
1 parent b2db19d commit 087af70
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions LanguageSelection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace pceuropa\languageSelection;

use Yii;
use yii\helpers\Html;
use yii\helpers\{Html, Url};
use pceuropa\languageSelection\LanguageAsset;

class LanguageSelection extends \yii\base\Widget {
Expand Down Expand Up @@ -39,15 +39,14 @@ public function patchFlag($lang){

public function allFlag(){
$items = '';

foreach ($this->language as $key => $value) {
if (Yii::$app->language != $value){
$img = Html::img( $this->patchFlag($value));
$a = Html::a ($img , ['', $this->languageParam => $key] );
$a = Html::a($img, Url::current([$this->languageParam => $key]));
$items .= Html::tag('li',$a );
}
}

return $items;
}

Expand Down

0 comments on commit 087af70

Please sign in to comment.