コード例 #1
0
ファイル: CurrHistory.php プロジェクト: roman1970/lis
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCurrency()
 {
     return $this->hasOne(Currencies::className(), ['id' => 'currency_id']);
 }
コード例 #2
0
ファイル: DefaultController.php プロジェクト: roman1970/lis
 public function actionIndex()
 {
     $currs = Currencies::find()->all();
     return $this->render('index', ['currs' => $currs]);
 }
コード例 #3
0
ファイル: MoneyBehavior.php プロジェクト: roman1970/lis
 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 ';
 }