refactor code to yii2 bootstrap template