app\controllers\CashbookController::findModel PHP Méthode

findModel() protected méthode

protected findModel ( $id )
    protected function findModel($id)
    {
        if (($model = Cashbook::findOne($id)) !== null && $model->user_id == Yii::$app->user->id) {
            return $model;
        } else {
            throw new NotFoundHttpException('The page you requested is not available or does not exist.');
        }
    }