예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCurrency()
 {
     return $this->hasOne(Currencies::className(), ['id' => 'currency_id']);
 }
예제 #2
0
 public function actionIndex()
 {
     $currs = Currencies::find()->all();
     return $this->render('index', ['currs' => $currs]);
 }
예제 #3
0
 public function makeAndSetInHumanUnderstoodView($value)
 {
     $rub_cop = explode('.', $value);
     $this->owner->{$this->prop_out} = $rub_cop[0] . ' ' . Currencies::findOne($this->owner->{$this->currency_out_prop})->name . ' ' . $rub_cop[1] . ' c ';
 }