protected function chooseView(){
        if($this->guestView){
            if(Yii::$app->user->isGuest){
                $this->controller->layout=$this->guestLayout;
                $this->view=$this->guestView;
            }
        }
        if($this->userView){
            if(!Yii::$app->user->isGuest){
                $this->controller->layout=$this->userLayout;
                $this->view=$this->userView;
            }
        }
    }
protected function chooseView(){
        if($this->guestView){
            if(Yii::$app->user->isGuest){
                $this->controller->layout=$this->guestLayout;
                $this->view=$this->guestView;
            }
        }
        if($this->userView){
            if(!Yii::$app->user->isGuest){
                $this->controller->layout=$this->userLayout;
                $this->view=$this->userView;
            }
        }
    }
protected function chooseView ( ) { if ( $ this -> guestView ) { if ( Yii :: $ app -> user -> isGuest ) { $ this -> controller -> layout = $ this -> guestLayout ; $ this -> view = $ this -> guestView ; } } if ( $ this -> userView ) { if ( ! Yii :: $ app -> user -> isGuest ) { $ this -> controller -> layout = $ this -> userLayout ; $ this -> view = $ this -> userView ; } } }
select view template of error view by different group
select view template of error view by different group