/** * Finds the RolOperacion model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $rol_id * @param integer $operacion_id * @return RolOperacion the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($rol_id, $operacion_id) { if (($model = RolOperacion::findOne(['rol_id' => $rol_id, 'operacion_id' => $operacion_id])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }