• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uctrans函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uctrans函数的典型用法代码示例。如果您正苦于以下问题:PHP uctrans函数的具体用法?PHP uctrans怎么用?PHP uctrans使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: getDatatable

 public function getDatatable()
 {
     $account = Auth::user()->account;
     $query = DB::table('products')->leftJoin('tax_rates', function ($join) {
         $join->on('tax_rates.id', '=', 'products.default_tax_rate_id')->whereNull('tax_rates.deleted_at');
     })->where('products.account_id', '=', Auth::user()->account_id)->where('products.deleted_at', '=', null)->select('products.public_id', 'products.product_key', 'products.notes', 'products.cost', 'tax_rates.name as tax_name', 'tax_rates.rate as tax_rate');
     $datatable = Datatable::query($query)->addColumn('product_key', function ($model) {
         return link_to('products/' . $model->public_id . '/edit', $model->product_key);
     })->addColumn('notes', function ($model) {
         return nl2br(Str::limit($model->notes, 100));
     })->addColumn('cost', function ($model) {
         return Utils::formatMoney($model->cost);
     });
     if ($account->invoice_item_taxes) {
         $datatable->addColumn('tax_rate', function ($model) {
             return $model->tax_rate ? $model->tax_name . ' ' . $model->tax_rate . '%' : '';
         });
     }
     return $datatable->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
                     <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
                       ' . trans('texts.select') . ' <span class="caret"></span>
                     </button>
                     <ul class="dropdown-menu" role="menu">
                     <li><a href="' . URL::to('products/' . $model->public_id) . '/edit">' . uctrans('texts.edit_product') . '</a></li>
                     <li class="divider"></li>
                     <li><a href="' . URL::to('products/' . $model->public_id) . '/archive">' . uctrans('texts.archive_product') . '</a></li>
                   </ul>
                 </div>';
     })->orderColumns(['cost', 'product_key', 'cost'])->make();
 }
开发者ID:n-a-m-e,项目名称:invoice-ninja,代码行数:31,代码来源:ProductController.php


示例2: getDatatable

 public function getDatatable()
 {
     $query = DB::table('account_tokens')->where('account_tokens.account_id', '=', Auth::user()->account_id);
     if (!Session::get('show_trash:token')) {
         $query->where('account_tokens.deleted_at', '=', null);
     }
     $query->select('account_tokens.public_id', 'account_tokens.name', 'account_tokens.token', 'account_tokens.public_id', 'account_tokens.deleted_at');
     return Datatable::query($query)->addColumn('name', function ($model) {
         return link_to('tokens/' . $model->public_id . '/edit', $model->name);
     })->addColumn('token', function ($model) {
         return $model->token;
     })->addColumn('dropdown', function ($model) {
         $actions = '<div class="btn-group tr-action" style="visibility:hidden;">
           <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
             ' . trans('texts.select') . ' <span class="caret"></span>
           </button>
           <ul class="dropdown-menu" role="menu">';
         if (!$model->deleted_at) {
             $actions .= '<li><a href="' . URL::to('tokens/' . $model->public_id) . '/edit">' . uctrans('texts.edit_token') . '</a></li>
                        <li class="divider"></li>
                        <li><a href="javascript:deleteToken(' . $model->public_id . ')">' . uctrans('texts.delete_token') . '</a></li>';
         }
         $actions .= '</ul>
       </div>';
         return $actions;
     })->orderColumns(['name', 'token'])->make();
 }
开发者ID:nafrente,项目名称:invoice-ninja,代码行数:27,代码来源:TokenController.php


示例3: getDatatable

 public function getDatatable()
 {
     $products = $this->ProductRepo->find(Input::get('sSearch'));
     return Datatable::query($products)->addColumn('checkbox', function ($model) {
         return '<input type="checkbox" name="ids[]" value="' . $model->public_id . '">';
     })->addColumn('product_key', function ($model) {
         return link_to('products/' . $model->public_id, $model->product_key);
     })->addColumn('notes', function ($model) {
         return nl2br(Str::limit($model->notes, 50));
     })->addColumn('cost', function ($model) {
         return Utils::formatMoney($model->cost, 1);
     })->addColumn('name', function ($model) {
         return nl2br($model->category_name);
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
             <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
               ' . trans('texts.select') . ' <span class="caret"></span>
             </button>
             <ul class="dropdown-menu" role="menu">
             <li><a href="' . URL::to('products/' . $model->public_id) . '/edit">' . uctrans('texts.edit_product') . '</a></li>                
             <li class="divider"></li>
             <li><a href="' . URL::to('products/' . $model->public_id) . '/archive">' . uctrans('texts.delete_product') . '</a></li>
           </ul>
         </div>';
     })->make();
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:26,代码来源:ProductController.php


示例4: getDatatable

 public function getDatatable()
 {
     $query = DB::table('users')->where('users.account_id', '=', Auth::user()->account_id);
     if (!Session::get('show_trash:user')) {
         $query->where('users.deleted_at', '=', null);
     }
     $query->where('users.public_id', '>', 0)->select('users.public_id', 'users.first_name', 'users.last_name', 'users.email', 'users.confirmed', 'users.public_id', 'users.deleted_at');
     return Datatable::query($query)->addColumn('first_name', function ($model) {
         return link_to('users/' . $model->public_id . '/edit', $model->first_name . ' ' . $model->last_name);
     })->addColumn('email', function ($model) {
         return $model->email;
     })->addColumn('confirmed', function ($model) {
         return $model->deleted_at ? trans('texts.deleted') : ($model->confirmed ? trans('texts.active') : trans('texts.pending'));
     })->addColumn('dropdown', function ($model) {
         $actions = '<div class="btn-group tr-action" style="visibility:hidden;">
           <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
             ' . trans('texts.select') . ' <span class="caret"></span>
           </button>
           <ul class="dropdown-menu" role="menu">';
         if ($model->deleted_at) {
             $actions .= '<li><a href="' . URL::to('restore_user/' . $model->public_id) . '">' . uctrans('texts.restore_user') . '</a></li>';
         } else {
             $actions .= '<li><a href="' . URL::to('users/' . $model->public_id) . '/edit">' . uctrans('texts.edit_user') . '</a></li>';
             if (!$model->confirmed) {
                 $actions .= '<li><a href="' . URL::to('send_confirmation/' . $model->public_id) . '">' . uctrans('texts.send_invite') . '</a></li>';
             }
             $actions .= '<li class="divider"></li>
             <li><a href="javascript:deleteUser(' . $model->public_id . ')">' . uctrans('texts.delete_user') . '</a></li>';
         }
         $actions .= '</ul>
       </div>';
         return $actions;
     })->orderColumns(['first_name', 'email', 'confirmed'])->make();
 }
开发者ID:GhDj,项目名称:erp-fac-fin,代码行数:34,代码来源:UserController.php


示例5: getDatatableActions

 protected function getDatatableActions($entityType)
 {
     return [[uctrans('texts.edit_user'), function ($model) {
         return URL::to("users/{$model->public_id}/edit");
     }], [uctrans('texts.send_invite'), function ($model) {
         return URL::to("send_confirmation/{$model->public_id}");
     }, function ($model) {
         return !$model->confirmed;
     }]];
 }
开发者ID:jargij,项目名称:invoiceninja,代码行数:10,代码来源:UserService.php


示例6: actions

 public function actions()
 {
     return [[uctrans('texts.edit_user'), function ($model) {
         return URL::to("users/{$model->public_id}/edit");
     }, function ($model) {
         return $model->public_id;
     }], [uctrans('texts.send_invite'), function ($model) {
         return URL::to("send_confirmation/{$model->public_id}");
     }, function ($model) {
         return $model->public_id && !$model->confirmed;
     }]];
 }
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:12,代码来源:UserDatatable.php


示例7: getDatatable

 public function getDatatable()
 {
     $query = DB::table('categories')->where('categories.account_id', '=', Auth::user()->account_id)->where('categories.deleted_at', '=', null)->where('categories.public_id', '>', 0)->select('categories.public_id', 'categories.name');
     return Datatable::query($query)->addColumn('name', function ($model) {
         return link_to('categories/' . $model->public_id . '/edit', $model->name);
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
         <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
           ' . trans('texts.select') . ' <span class="caret"></span>
         </button>
         <ul class="dropdown-menu" role="menu">
         <li><a href="' . URL::to('categories/' . $model->public_id) . '/edit">' . uctrans('texts.edit_category') . '</a></li>                
       </ul>
     </div>';
     })->orderColumns(['name'])->make();
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:16,代码来源:CategoryController.php


示例8: getDatatable

 public function getDatatable()
 {
     $query = DB::table('book_sales')->where('book_sales.account_id', '=', Auth::user()->account_id)->where('book_sales.deleted_at', '=', null)->select('book_sales.id', 'book_sales.invoice_number', 'book_sales.client_nit', 'book_sales.client_name', 'book_sales.amount');
     return Datatable::query($query)->addColumn('invoice_number', function ($model) {
         return link_to('manuals/' . $model->id . '/edit', $model->invoice_number);
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
         <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
           ' . trans('texts.select') . ' <span class="caret"></span>
         </button>
         <ul class="dropdown-menu" role="menu">
         <li><a href="' . URL::to('manuals/' . $model->id) . '/edit">' . uctrans('texts.edit_manual') . '</a></li>                
         <li class="divider"></li>
         <li><a href="' . URL::to('manuals/' . $model->id) . '/archive">' . uctrans('texts.archive_manual') . '</a></li>
       </ul>
     </div>';
     })->orderColumns(['invoice_number'])->make();
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:18,代码来源:ManualController.php


示例9: getInvoiceLabels

 /**
  * @return array
  */
 public function getInvoiceLabels()
 {
     $data = [];
     $custom = (array) json_decode($this->invoice_labels);
     $fields = ['invoice', 'invoice_date', 'due_date', 'invoice_number', 'po_number', 'discount', 'taxes', 'tax', 'item', 'description', 'unit_cost', 'quantity', 'line_total', 'subtotal', 'paid_to_date', 'balance_due', 'partial_due', 'terms', 'your_invoice', 'quote', 'your_quote', 'quote_date', 'quote_number', 'total', 'invoice_issued_to', 'quote_issued_to', 'rate', 'hours', 'balance', 'from', 'to', 'invoice_to', 'quote_to', 'details', 'invoice_no', 'valid_until', 'client_name', 'address1', 'address2', 'id_number', 'vat_number', 'city_state_postal', 'country', 'email', 'contact_name', 'company_name', 'website', 'phone'];
     foreach ($fields as $field) {
         if (isset($custom[$field]) && $custom[$field]) {
             $data[$field] = $custom[$field];
         } else {
             $data[$field] = $this->isEnglish() ? uctrans("texts.{$field}") : trans("texts.{$field}");
         }
     }
     foreach (['item', 'quantity', 'unit_cost'] as $field) {
         $data["{$field}_orig"] = $data[$field];
     }
     foreach (['invoice.custom_text_value1' => 'custom_invoice_text_label1', 'invoice.custom_text_value2' => 'custom_invoice_text_label2', 'client.custom_value1' => 'custom_client_label1', 'client.custom_value2' => 'custom_client_label2', 'account.custom_value1' => 'custom_label1', 'account.custom_value2' => 'custom_label2'] as $field => $property) {
         $data[$field] = $this->{$property} ?: trans('texts.custom_field');
     }
     return $data;
 }
开发者ID:rafaelsisweb,项目名称:invoice-ninja,代码行数:23,代码来源:PresentsInvoice.php


示例10: getDatatable

 public function getDatatable()
 {
     $query = DB::table('groups')->where('groups.account_id', '=', Auth::user()->account_id)->where('groups.deleted_at', '=', null)->where('groups.public_id', '>=', 0)->select('groups.public_id', 'groups.code', 'groups.name', 'groups.text');
     return Datatable::query($query)->addColumn('code', function ($model) {
         return link_to('groups/' . $model->public_id . '/edit', $model->code);
     })->addColumn('name', function ($model) {
         return nl2br(Str::limit($model->name, 100));
     })->addColumn('text', function ($model) {
         return nl2br(Str::limit($model->text, 100));
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
         <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
           ' . trans('texts.select') . ' <span class="caret"></span>
         </button>
         <ul class="dropdown-menu" role="menu">
         <li><a href="' . URL::to('groups/' . $model->public_id) . '">Ver Grupo</a></li>
         <li><a href="' . URL::to('groups/' . $model->public_id) . '/edit">' . uctrans('texts.edit_group') . '</a></li>
         <li class="divider"></li>
         <li><a href="' . URL::to('groups/' . $model->public_id) . '/archive">' . uctrans('texts.archive_group') . '</a></li>
       </ul>
     </div>';
     })->orderColumns(['code', 'name', 'text'])->make();
 }
开发者ID:Vrian7ipx,项目名称:cascadadev,代码行数:23,代码来源:GroupController.php


示例11: getDatatable

 public function getDatatable()
 {
     $query = DB::table('branches')->where('branches.account_id', '=', Auth::user()->account_id)->where('branches.deleted_at', '=', null)->where('branches.public_id', '>', 0)->select('branches.public_id', 'branches.name', 'branches.economic_activity', 'branches.address1', 'branches.address2', 'branches.work_phone');
     return Datatable::query($query)->addColumn('name', function ($model) {
         return link_to('branches/' . $model->public_id . '/edit', $model->name);
     })->addColumn('economic_activity', function ($model) {
         return nl2br(Str::limit($model->economic_activity, 100));
     })->addColumn('address1', function ($model) {
         return nl2br(Str::limit($model->address2, 60)) . ', ' . nl2br(Str::limit($model->address1, 40));
     })->addColumn('work_phone', function ($model) {
         return nl2br(Str::limit($model->work_phone, 30));
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
         <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
           ' . trans('texts.select') . ' <span class="caret"></span>
         </button>
         <ul class="dropdown-menu" role="menu">
         <li><a href="' . URL::to('branches/' . $model->public_id) . '/edit">' . uctrans('texts.edit_branch') . '</a></li>                
         <li class="divider"></li>
         <li><a href="' . URL::to('branches/' . $model->public_id) . '/archive">' . uctrans('texts.archive_branch') . '</a></li>
       </ul>
     </div>';
     })->orderColumns(['name', 'address1'])->make();
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:24,代码来源:BranchController.php


示例12: getDatatable

 public function getDatatable()
 {
     $query = DB::table('users')->where('users.account_id', '=', Auth::user()->account_id)->where('users.deleted_at', '=', null)->where('users.public_id', '>', 0)->select('users.public_id', 'users.first_name', 'users.last_name', 'users.email', 'users.phone', 'users.is_admin', 'users.public_id');
     return Datatable::query($query)->addColumn('first_name', function ($model) {
         return link_to('users/' . $model->public_id . '/edit', $model->first_name . ' ' . $model->last_name);
     })->addColumn('email', function ($model) {
         return $model->email;
     })->addColumn('phone', function ($model) {
         return $model->phone;
     })->addColumn('is_admin', function ($model) {
         return $model->is_admin ? 'Administrador' : 'Cajero';
     })->addColumn('dropdown', function ($model) {
         return '<div class="btn-group tr-action" style="visibility:hidden;">
           <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
             ' . trans('texts.select') . ' <span class="caret"></span>
           </button>
           <ul class="dropdown-menu" role="menu">
           <li><a href="' . URL::to('users/' . $model->public_id) . '/edit">' . uctrans('texts.edit_user') . '</a></li>
           <li class="divider"></li>
           <li><a href="javascript:deleteUser(' . $model->public_id . ')">' . uctrans('texts.delete_user') . '</a></li>              
         </ul>
       </div>';
     })->orderColumns(['first_name', 'email'])->make();
 }
开发者ID:aleguisf,项目名称:fvdev1,代码行数:24,代码来源:UserController.php


示例13: getInvoiceLabels

 public function getInvoiceLabels()
 {
     $data = [];
     $custom = (array) json_decode($this->invoice_labels);
     $fields = ['invoice', 'invoice_date', 'due_date', 'invoice_number', 'po_number', 'discount', 'taxes', 'tax', 'item', 'description', 'unit_cost', 'quantity', 'line_total', 'subtotal', 'paid_to_date', 'balance_due', 'amount_due', 'terms', 'your_invoice', 'quote', 'your_quote', 'quote_date', 'quote_number', 'total', 'invoice_issued_to', 'date', 'rate', 'hours', 'balance', 'from', 'to', 'invoice_to', 'details', 'invoice_no', 'valid_until'];
     foreach ($fields as $field) {
         if (isset($custom[$field]) && $custom[$field]) {
             $data[$field] = $custom[$field];
         } else {
             $data[$field] = $this->isEnglish() ? uctrans("texts.{$field}") : trans("texts.{$field}");
         }
     }
     foreach (['item', 'quantity', 'unit_cost'] as $field) {
         $data["{$field}_orig"] = $data[$field];
     }
     return $data;
 }
开发者ID:vegardwikeby,项目名称:invoice-ninja,代码行数:17,代码来源:Account.php


示例14: getDatatableActions

 protected function getDatatableActions($entityType)
 {
     return [[uctrans('texts.edit_bank_account'), function ($model) {
         return URL::to("bank_accounts/{$model->public_id}/edit");
     }]];
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:6,代码来源:BankAccountService.php


示例15: actions

 public function actions()
 {
     return [[uctrans('texts.edit_bank_account'), function ($model) {
         return URL::to("bank_accounts/{$model->public_id}/edit");
     }]];
 }
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:6,代码来源:BankAccountDatatable.php


示例16: actions

 public function actions()
 {
     $actions = [[uctrans('texts.resend_confirmation_email'), function ($model) {
         return $model->resendConfirmationUrl;
     }, function ($model) {
         return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->resendConfirmationUrl);
     }], [uctrans('texts.edit_gateway'), function ($model) {
         return URL::to("gateways/{$model->public_id}/edit");
     }, function ($model) {
         return !$model->deleted_at;
     }], [uctrans('texts.finish_setup'), function ($model) {
         return $model->setupUrl;
     }, function ($model) {
         return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->setupUrl);
     }], [uctrans('texts.manage_account'), function ($model) {
         $accountGateway = $this->getAccountGateway($model->id);
         $endpoint = WEPAY_ENVIRONMENT == WEPAY_STAGE ? 'https://stage.wepay.com/' : 'https://www.wepay.com/';
         return ['url' => $endpoint . 'account/' . $accountGateway->getConfig()->accountId, 'attributes' => 'target="_blank"'];
     }, function ($model) {
         return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY;
     }], [uctrans('texts.terms_of_service'), function ($model) {
         return 'https://go.wepay.com/terms-of-service-us';
     }, function ($model) {
         return $model->gateway_id == GATEWAY_WEPAY;
     }]];
     foreach (Cache::get('gatewayTypes') as $gatewayType) {
         $actions[] = [trans('texts.set_limits', ['gateway_type' => $gatewayType->name]), function () use($gatewayType) {
             $accountGatewaySettings = AccountGatewaySettings::scope()->where('account_gateway_settings.gateway_type_id', '=', $gatewayType->id)->first();
             $min = $accountGatewaySettings && $accountGatewaySettings->min_limit !== null ? $accountGatewaySettings->min_limit : 'null';
             $max = $accountGatewaySettings && $accountGatewaySettings->max_limit !== null ? $accountGatewaySettings->max_limit : 'null';
             return "javascript:showLimitsModal('{$gatewayType->name}', {$gatewayType->id}, {$min}, {$max})";
         }, function ($model) use($gatewayType) {
             // Only show this action if the given gateway supports this gateway type
             if ($model->gateway_id == GATEWAY_CUSTOM) {
                 return $gatewayType->id == GATEWAY_TYPE_CUSTOM;
             } else {
                 $accountGateway = $this->getAccountGateway($model->id);
                 $paymentDriver = $accountGateway->paymentDriver();
                 $gatewayTypes = $paymentDriver->gatewayTypes();
                 return in_array($gatewayType->id, $gatewayTypes);
             }
         }];
     }
     return $actions;
 }
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:45,代码来源:AccountGatewayDatatable.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ucwords函数代码示例发布时间:2022-05-23
下一篇:
PHP ucfirst函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap