Example #1
0
?>

    <?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 
echo $form->field($perfil, 'fecha_nacimiento')->widget(DatePicker::className(), ['options' => ['class' => 'form-control'], 'clientOptions' => ['changeYear' => true, 'changeMonth' => true]]);
?>

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

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

    <?php 
Example #2
0
 /**
  * @inheritdoc
  */
 public static function getListaSexo()
 {
     $opciones = Sexo::find()->asArray()->all();
     return ArrayHelper::map($opciones, 'id', 'sexo_nombre');
 }
Example #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSexo()
 {
     return $this->hasOne(Sexo::className(), ['id' => 'sexo_id']);
 }