コード例 #1
0
ファイル: M1000Search.php プロジェクト: adem-team/advanced
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = M1000::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'status' => $this->status]);
     $query->andFilterWhere(['like', 'kd_menu', $this->kd_menu])->andFilterWhere(['like', 'nm_menu', $this->nm_menu])->andFilterWhere(['like', 'jval', $this->jval])->andFilterWhere(['like', 'note', $this->note])->andFilterWhere(['like', 'created_by', $this->created_by])->andFilterWhere(['like', 'updated_by', $this->updated_by]);
     return $dataProvider;
 }
コード例 #2
0
ファイル: main.php プロジェクト: adem-team/advanced
     * \vendor\yiisoft\yii2\web\View.php
     */
    $side_menu = '';
    //echo $this->sideMenu;
    if ($this->sideMenu != false) {
        $getSideMenu = $this->sideMenu;
        if (M1000::find()->findMenu($this->sideMenu)->one()) {
            $getSideMenu = $this->sideMenu;
        } else {
            echo Html::panel(['heading' => 'variabel $this->sideMenu = "' . $getSideMenu . '"; Tidak ditemukan dalam database dbm000, tabel m1000, tambahkan pada view anda menu yang benar untuk menu samping '], Html::TYPE_INFO);
            $getSideMenu = 'mdefault';
        }
    } else {
        $getSideMenu = 'mdefault';
    }
    $side_menu = \yii\helpers\Json::decode(M1000::find()->findMenu($getSideMenu)->one()->jval);
    if (!Yii::$app->user->isGuest) {
        echo SideNav::widget(['items' => $side_menu, 'encodeLabels' => false, 'type' => SideNav::TYPE_DEFAULT, 'options' => ['class' => 'navbar-default bg-black']]);
    }
    ?>

                        </section>
                    </aside>
                    <div class="content-wrapper">
                        <!--<div class="panel panel-default" style="margin-bottom: 0">!-->
                            <?php 
    /*
    							   echo Breadcrumbs::widget([
                                                   'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
                                                   'options'=>[
                                                       'class' => 'breadcrumb',