lajax\translatemanager\controllers\LanguageController::findModel PHP Method

findModel() public method

If the model is not found, a 404 HTTP exception will be thrown.
public findModel ( string $id ) : Language
$id string
return Language the loaded model
    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.');
        }
    }