Rewrite to Yii2