public function aryData_layer()
 {
     return ArrayHelper::map(DraftLayer::find()->all(), 'LAYER_ID', 'LAYER_NM');
     // return ArrayHelper::map(DraftLayer::find()->all(), 'LAYER_ID',function($model) {
     // return $model['LAYER_NM'].'-'.$model['DCRIPT'];
     // });
 }
Exemplo n.º 2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = DraftLayer::find();
     // add conditions that should always apply here
     $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;
     }
     // grid filtering conditions
     $query->andFilterWhere(['LAYER_ID' => $this->LAYER_ID, 'JEDA_PEKAN' => $this->JEDA_PEKAN]);
     $query->andFilterWhere(['like', 'LAYER_NM', $this->LAYER_NM])->andFilterWhere(['like', 'DCRIPT', $this->DCRIPT]);
     return $dataProvider;
 }
Exemplo n.º 3
0
 public function getLayerTbl()
 {
     return $this->hasOne(DraftLayer::className(), ['LAYER_ID' => 'LAYER']);
 }
Exemplo n.º 4
0
 public function getTbllayer()
 {
     return $this->hasOne(DraftLayer::className(), ['LAYER_ID' => 'LAYER'])->via('cust');
 }
 public function layer_nm()
 {
     return ArrayHelper::map(DraftLayer::find()->all(), 'cus_kd', 'LAYER_NM');
 }
Exemplo n.º 6
0
 /**
  * Finds the DraftLayer model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return DraftLayer the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = DraftLayer::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 7
0
 public function aryData_layer()
 {
     return ArrayHelper::map(DraftLayer::find()->all(), 'LAYER_ID', 'LAYER_NM');
 }