Example #1
0
 /**
  * Finds the Articulos model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param $municipio
  * @param $articulo
  * @return array|null|\yii\db\ActiveRecord
  * @throws NotFoundHttpException
  */
 protected function findModel($municipio, $articulo)
 {
     if (($model = Articulos::obtenerDetalleArticuloMunicipio($municipio, $articulo)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('El articulo no existe.');
     }
 }