当前位置: 首页>>代码示例>>PHP>>正文


PHP Currency::exchangeRates方法代码示例

本文整理汇总了PHP中app\models\Currency::exchangeRates方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::exchangeRates方法的具体用法?PHP Currency::exchangeRates怎么用?PHP Currency::exchangeRates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Currency的用法示例。


在下文中一共展示了Currency::exchangeRates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionMyAdverts

 public function actionMyAdverts()
 {
     if (Currency::find()->where(['>', 'date', time()])->orderBy(['date' => SORT_DESC])->asArray()->one() == null) {
         $currency = new Currency();
         if ($currency->exchangeRates()) {
             Yii::$app->session->setFlash('warning', 'Exchange rates might differ from actual ones');
         }
     }
     $searchModel = new AdvertSearch();
     $dataProvider = $searchModel->getMyAdverts();
     return $this->render('my-adverts', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
开发者ID:aiskimzhi,项目名称:advert,代码行数:12,代码来源:AdvertController.php

示例2: actionMyBookmarks

 public function actionMyBookmarks()
 {
     if (Currency::find()->where(['>', 'date', time()])->orderBy(['date' => SORT_DESC])->asArray()->one() == null) {
         $currency = new Currency();
         if ($currency->exchangeRates()) {
             Yii::$app->session->setFlash('warning', 'Exchange rates might differ from actual ones');
         }
     }
     $disabled_subcat = 'disabled';
     $disabled_city = 'disabled';
     $catList = ArrayHelper::map(Category::find()->asArray()->all(), 'id', 'name');
     $regionList = ArrayHelper::map(Region::find()->asArray()->all(), 'id', 'name');
     $subcatList = [];
     $cityList = [];
     $searchModel = new BookmarkSearch();
     $dataProvider = $searchModel->getMyBookmarks();
     $advert = new Advert();
     return $this->render('my-bookmarks', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'catList' => $catList, 'subcatList' => $subcatList, 'regionList' => $regionList, 'cityList' => $cityList, 'disabled_subcat' => $disabled_subcat, 'disabled_city' => $disabled_city, 'advert' => $advert]);
 }
开发者ID:aiskimzhi,项目名称:advert,代码行数:19,代码来源:BookmarkController.php


注:本文中的app\models\Currency::exchangeRates方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。