/** * @return \yii\db\ActiveQuery */ public function getCurrency() { return $this->hasOne(Currencies::className(), ['id' => 'currency_id']); }
public function actionIndex() { $currs = Currencies::find()->all(); return $this->render('index', ['currs' => $currs]); }
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 '; }