コード例 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = PartidaEspecifica::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(['cuenta' => $this->cuenta, 'partida' => $this->partida, 'generica' => $this->generica, 'especifica' => $this->especifica, 'estatus' => $this->estatus]);
     $query->andFilterWhere(['estatus' => $this->nombreEstatus]);
     $query->andFilterWhere(['like', 'nombre', $this->nombre]);
     return $dataProvider;
 }
コード例 #2
0
 /**
  * Finds the PartidaEspecifca model based on its composed key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param char(1) $cuenta
  * @param char(2) $partida
  * @param char(2) $generica
  * @param char(2) $especifica
  * @return el modelo
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($cuenta, $partida, $generica, $especifica)
 {
     if (($model = PartidaEspecifica::findOne(['cuenta' => $cuenta, 'partida' => $partida, 'generica' => $generica, 'especifica' => $especifica])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #3
0
ファイル: PartidaGenerica.php プロジェクト: minpppst/rsc
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPartidaEspecificas()
 {
     return $this->hasMany(PartidaEspecifica::className(), ['cuenta' => 'cuenta', 'partida' => 'partida', 'generica' => 'generica']);
 }
コード例 #4
0
ファイル: PartidaSubEspecifica.php プロジェクト: minpppst/rsc
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCuenta0()
 {
     return $this->hasOne(PartidaEspecifica::className(), ['cuenta' => 'cuenta', 'partida' => 'partida', 'generica' => 'generica', 'especifica' => 'especifica']);
 }