Example #1
0
 public function search($params)
 {
     $query = TipoDocumento::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id]);
     $query->andFilterWhere(['like', 'descripcion', $this->descripcion])->andFilterWhere(['like', 'abreviatura', $this->abreviatura]);
     return $dataProvider;
 }
Example #2
0
<div class="alumno-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($perfil, 'apellido')->textInput(['maxlength' => 30]);
?>

    <?php 
echo $form->field($perfil, 'nombre')->textInput(['maxlength' => 30]);
?>

    <?php 
echo $form->field($perfil, 'tipo_documento_id')->dropDownList(ArrayHelper::map(TipoDocumento::find()->orderBy('id ASC')->asArray()->all(), 'id', 'abreviatura'));
?>

    <?php 
echo $form->field($perfil, 'numero_documento')->textInput(['maxlength' => 30]);
?>

    <?php 
echo $form->field($perfil, 'estado_documento_id')->dropDownList(ArrayHelper::map(EstadoDocumento::find()->orderBy('id ASC')->asArray()->all(), 'id', 'descripcion'), ['prompt' => '']);
?>
    
    <?php 
echo $form->field($perfil, 'sexo_id')->dropDownList(ArrayHelper::map(Sexo::find()->orderBy('id ASC')->asArray()->all(), 'id', 'descripcion'), ['prompt' => '']);
?>

    <?php