protected function findModel($id)
    {
        $user = Page::findOne($id);
        if ($user === null) {
            throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist'));
        }
        return $user;
    }
protected function findModel($id)
    {
        $user = Page::findOne($id);
        if ($user === null) {
            throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist'));
        }
        return $user;
    }
protected function findModel ( $ id ) { $ user = Page :: findOne ( $ id ) ; if ( $ user === null ) { throw new NotFoundHttpException ( Yii :: t ( 'app' , 'The requested page does not exist' ) ) ; } return $ user ; }
Finds the Page model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.

@param int $id

@return Page the loaded model
@throws NotFoundHttpException if the model cannot be found
Finds the Page model based on its primary key value . If the model is not found a 404 HTTP exception will be thrown .