/**
  * Lists all Naturezaocorrencia models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new NaturezaocorrenciaSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Пример #2
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="ocorrencia-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
$campos = '(*)Campos obrigatórios';
?>
    <h5 style="color:red;"><?php 
echo Html::encode($campos);
?>
</h5>    

    <?php 
$arrayNatureza = ArrayHelper::map(NaturezaocorrenciaSearch::find()->all(), 'idNatureza', 'Nome');
?>

    <?php 
$arrayLocal = ArrayHelper::map(LocalSearch::find()->all(), 'idLocal', 'Nome');
?>

    <?php 
$arraySubLocal = ArrayHelper::map(SubLocal::find()->where(['idLocal' => $model->idLocal])->all(), 'idSubLocal', 'Nome');
?>

    <?php 
$arrayCategoria = ArrayHelper::map(CategoriaSearch::find()->all(), 'idCategoria', 'Nome');
?>

    <?php