Esempio n. 1
0
 /**
  * Lists all Puertos models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Puertos::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Esempio n. 2
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="funcionalidad-form">

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

    
    <?php 
echo $form->field($model, 'id_mother')->dropDownList(ArrayHelper::map(Mother::find()->all(), 'id', 'nombre'))->label('Mother');
?>
    
    <?php 
echo $form->field($model, 'id_puerto')->dropDownList(ArrayHelper::map(Puertos::find()->all(), 'id', ['nombre']))->label('Puerto');
?>
   

    <?php 
echo $form->field($model, 'descripcion')->textInput(['maxlength' => true]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();