Beispiel #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdSumberData()
 {
     return $this->hasOne(SumberData::className(), ['id' => 'id_sumber_data']);
 }
Beispiel #2
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\FaktaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Faktas';
$this->params['breadcrumbs'][] = $this->title;
$wilayah = \yii\helpers\ArrayHelper::map(\common\models\Wilayah::find()->all(), 'id', 'nama');
$bulan = \yii\helpers\ArrayHelper::map(\common\models\Bulan::find()->all(), 'id', 'nama');
$variabel = \yii\helpers\ArrayHelper::map(\common\models\Variabel::find()->all(), 'id', 'nama');
$kategori = \yii\helpers\ArrayHelper::map(\common\models\Kategori::find()->all(), 'id', 'nama');
$sumberData = \yii\helpers\ArrayHelper::map(\common\models\SumberData::find()->all(), 'id', 'nama_cs');
?>
<div class="fakta-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('Create Fakta', ['create'], ['class' => 'btn btn-success']);
?>
    </p>