Convert from yii1 to yii2