예제 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = PaymentSystem::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, 'name' => $this->name]);
     return $dataProvider;
 }
 /**
  * Finds the PaymentSystem model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return PaymentSystem the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = PaymentSystem::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
예제 #3
0
 /**
  * строит строку описания транзакции типа "выплата призовых"
  *
  * @param $data array входные данные для сообщения
  * @return string
  */
 public static function buildWithdrawDescr($data = [])
 {
     $payment_id = $data[1];
     $payment_name = PaymentSystem::getName($payment_id);
     $msg = Yii::t('tr', 'TRANSACTION_USER_WITHDRAW', ['payment_name' => $payment_name]);
     return $msg;
 }
예제 #4
0
echo $form->field($model, 'game_id')->dropDownList([null => '----'] + $model->gamesList, [$model->game_id]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'value')->textInput(['maxlength' => true]);
?>

        </div>

        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'payment_type')->dropDownList([null => '----'] + PaymentSystem::getPaymentSystemsList(), [$model->payment_type]);
?>
            <?php 
echo $form->field($model, 'fantasy_id')->dropDownList([null => '----'], [$model->fantasy_id]);
?>
            <?//= $form->field($model, 'fantasy_id')->dropDownList([null=>'----'] + DotaFantasy::getActiveFantasiesList(), [$model->fantasy_id]) ?>
        </div>
    </div>





    <?php 
echo $form->field($model, 'comment')->textArea();
?>