protected function findModel($id) { if (($model = NurseryForm::findOne($id)) !== null) { return $model; } elseif (($model = KinderOneForm::findOne($id)) !== null) { return $model; } elseif (($model = KinderTwoForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeOneForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeTwoForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeThreeForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeFourForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeFiveForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeSixForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeSevenForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeEightForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeNineForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeTenForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeElevenFirstSemForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeElevenSecondSemForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeTwelveFirstSemForm::findOne($id)) !== null) { return $model; } elseif (($model = GradeTwelveSecondSemForm::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * Finds the NurseryForm model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param string $id * @return NurseryForm the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = NurseryForm::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }