public function findModel($id) { if (($model = \lajax\translatemanager\models\Language::findOne($id)) !== null) { return $model; } else { throw new \yii\web\NotFoundHttpException('The requested page does not exist.'); } }