Old Yii1 to create an url we write:
$this->createUrl();
or
Yii::app()->createUrl();
Now with Yii2 we have to write
\Yii::$app->getUrlManager()->createUrl(['controler/action','param1'=>'value1','param2'=>'value2']);
$this->createUrl();
or
Yii::app()->createUrl();
Now with Yii2 we have to write
\Yii::$app->getUrlManager()->createUrl(['controler/action','param1'=>'value1','param2'=>'value2']);