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


PHP Currency::all方法代码示例

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


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

示例1: getSelectedCurrency

 static function getSelectedCurrency($db)
 {
     if (!isset(Currency::$selected_currency_cache)) {
         $currencies = Currency::all($db);
         if (isset($_COOKIE['currency'])) {
             $selected_currency_id = $_COOKIE['currency'];
             $selected_currency = Currency::find($currencies, 'currency_id', $selected_currency_id);
         }
         if (!isset($selected_currency)) {
             $selected_currency = Currency::find($currencies, 'currency_value', 1);
         }
         Currency::$selected_currency_cache = $selected_currency;
     }
     return Currency::$selected_currency_cache;
 }
开发者ID:lotcz,项目名称:zshop,代码行数:15,代码来源:currency.m.php

示例2: update_user_form

 public function update_user_form($user_id, $form_id)
 {
     $user = $this->user->find($user_id);
     $form = $this->form->find($form_id);
     $currencies = Currency::all();
     $cargo_types = CargoType::all();
     $contract_types = ContractType::all();
     $data = Input::except('_token', 'tax_content');
     if ($form->is_valid($data)) {
         $form->fill($data);
         if (Input::get('insurance') == 'on') {
             $form->insurance = 1;
         } else {
             $form->insurance = 0;
         }
         if (Input::get('admin_confirmed') == 'on') {
             $form->admin_confirmed = 1;
         } else {
             $form->admin_confirmed = 0;
         }
         if (null !== Input::get('tax_content')) {
             if (!$form->tax) {
                 $tax = new Tax(['content' => Input::get('tax_content')]);
                 $tax = $form->tax()->save($tax);
             } else {
                 $form->tax->content = Input::get('tax_content');
                 $form->tax->save();
             }
         }
         $form->save();
         return View::make('admin.form.show')->withForm($form)->withUser($user)->withErrors(['msg' => ['Сохранено!']])->withCurrencies($currencies)->withCargotypes($cargo_types)->with('contract_types', $contract_types);
     }
     return Redirect::back()->withInput()->withErrors(DeliveryForm::$errors);
 }
开发者ID:imsgithub,项目名称:hotlot.com,代码行数:34,代码来源:DeliveryFormsController.php

示例3: edit

 /**
  * Show the form for editing the specified loanproduct.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $loanproduct = Loanproduct::find($id);
     $currencies = Currency::all();
     return View::make('loanproducts.edit', compact('loanproduct', 'currencies'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:12,代码来源:LoanproductsController.php

示例4: t

<?php

global $db, $raw_path, $messages, $home_dir, $custAuth;
require_once $home_dir . 'models/currency.m.php';
$currencies = Currency::all($db);
$selected_currency = Currency::getSelectedCurrency($db);
$is_logged_in = $custAuth->isAuth() && !$custAuth->customer->val('customer_anonymous');
?>
<div class="btn-group" role="group" aria-label="...">
	<div class="language dropdown btn btn-default">
		<span class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
			<img src="/images/<?php 
echo t('language_code');
?>
.jpg" alt="<?php 
echo t('language_name');
?>
" title="<?php 
echo t('language_name');
?>
" />
			<?php 
echo t('language_name');
?>
			<span class="caret"></span>
		</span>
		<ul class="dropdown-menu">
			<li class="<?php 
echo t('cs_css');
?>
"><a href="#" onclick="javascript:setLang('cs');return false" ><img src="/images/cs.jpg" alt="<?php 
开发者ID:lotcz,项目名称:zshop,代码行数:31,代码来源:menu.b.php

示例5: index

 /**
  * Display a listing of currencies
  *
  * @return Response
  */
 public function index()
 {
     $currencies = Currency::all();
     return View::make('currencies.index', compact('currencies'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:10,代码来源:CurrenciesController.php

示例6: getCurrencies

 public function getCurrencies()
 {
     return Currency::all();
 }
开发者ID:strikles,项目名称:php,代码行数:4,代码来源:PromoterController.php

示例7: currencies

 private function currencies()
 {
     $class = get_class(new Currency());
     $this->log($this->verb . ' Currencies');
     $url = $this->baseUrl . "currency?c:limit=100";
     $data = $this->getCensusData($url);
     if (!$data) {
         return false;
     }
     // Collection of Eloquent objects from API
     $apiCollection = new Collection();
     foreach ($data->currency_list as $currency) {
         $values = [];
         $values['id'] = isset($currency->currency_id) ? $currency->currency_id : null;
         $values['name'] = isset($currency->name->en) ? $currency->name->en : null;
         $apiCollection->add(new Currency($values));
     }
     $currencies = Currency::all();
     $this->addModels($class, $currencies, $apiCollection);
     $this->deleteModels($class, $currencies, $apiCollection);
     $this->updateModels($class, Currency::all(), $apiCollection, ['name']);
 }
开发者ID:ps2maps,项目名称:ps2maps.com,代码行数:22,代码来源:Census.php


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