コード例 #1
0
ファイル: EfMenuSubSearch.php プロジェクト: bomcpe11/cosmos
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = EfMenuSub::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(['MENU_SUB_ID' => $this->MENU_SUB_ID, 'MENU_MAIN_ID' => $this->MENU_MAIN_ID, 'SEQ' => $this->SEQ, 'CREATE_BY' => $this->CREATE_BY, 'CREATE_DATE' => $this->CREATE_DATE, 'LAST_UPD_BY' => $this->LAST_UPD_BY, 'LAST_UPD_DATE' => $this->LAST_UPD_DATE]);
     $query->andFilterWhere(['like', 'MENU_SUB_NAME', $this->MENU_SUB_NAME])->andFilterWhere(['like', 'DESCRIPTION', $this->DESCRIPTION])->andFilterWhere(['like', 'MENU_LINK', $this->MENU_LINK])->andFilterWhere(['like', 'STATUS', $this->STATUS]);
     return $dataProvider;
 }
コード例 #2
0
ファイル: EfGroupRole.php プロジェクト: bomcpe11/cosmos
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMENUSUB()
 {
     return $this->hasOne(EfMenuSub::className(), ['MENU_SUB_ID' => 'MENU_SUB_ID']);
 }
コード例 #3
0
ファイル: MenuSubController.php プロジェクト: bomcpe11/cosmos
 /**
  * Finds the EfMenuSub model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return EfMenuSub the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = EfMenuSub::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #4
0
ファイル: EfMenuMain.php プロジェクト: bomcpe11/cosmos
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEfMenuSubs()
 {
     return $this->hasMany(EfMenuSub::className(), ['MENU_MAIN_ID' => 'MENU_MAIN_ID']);
 }