Exemplo n.º 1
0
 /**
  * Creates a new Empleado model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new Atributos();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
Exemplo n.º 2
0
 public function actionAtributos($pasoId)
 {
     $model = new Atributos();
     $model->pasoId = $pasoId;
     $atributos = Atributos::find()->where('pasoId = :pasoId', ['pasoId' => $pasoId])->all();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         $id = $model->tipoTramiteId;
         $model = new Atributos();
         return $this->redirect(['atributos', 'model' => $model, 'atributos' => $atributos, 'pasoId' => $pasoId, 'id' => $id]);
     } else {
         return $this->render('atributos', ['model' => $model, 'atributos' => $atributos]);
     }
 }