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


PHP Vendor::all方法代码示例

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


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

示例1: index

 public function index()
 {
     try {
         $vendorList = Vendor::all();
         //venNum will be used for css coloring
         $vendorNumber = 0;
         foreach ($vendorList as $vendor) {
             $vendor->venNum = $vendorNumber;
             $vendorNumber++;
         }
         return $vendorList->toJson();
     } catch (Exception $e) {
         return '{"error":{"text":' . $e->getMessage() . '}}';
     }
 }
开发者ID:p-tricky,项目名称:CAEWeb,代码行数:15,代码来源:VendorApiController.php

示例2: update

 public static function update($id)
 {
     self::check_logged_in();
     $params = $_POST;
     $attributes = array('id' => $id, 'vendor_id' => $params['vendor_id'], 'partnumber' => $params['partnumber'], 'datasheeturl' => $params['datasheeturl']);
     $vendoritem = new VendorItem($attributes);
     $errors = $vendoritem->errors();
     if (count($errors) > 0) {
         $vendoritem = VendorItem::find($id);
         $vendors = Vendor::all();
         View::make('vendoritem/edit.html', array('errors' => $errors, 'attributes' => $attributes, 'vendoritem' => $vendoritem, 'vendors' => $vendors));
     } else {
         $vendoritem->update();
         Redirect::to('/vendoritem/' . $vendoritem->id, array('message' => 'The vendor item has been modified successfully!'));
     }
 }
开发者ID:jackrl,项目名称:Tsoha-Bootstrap,代码行数:16,代码来源:vendoritems_controller.php

示例3: run

 public function run()
 {
     foreach (Vendor::all() as $vendor) {
         $vendor->sync_with_dsbs_and_sam();
     }
 }
开发者ID:ajb,项目名称:rfpez,代码行数:6,代码来源:sync_vendors_with_sam_and_dsbs.php

示例4: require_login

<?php

include_once '../../../_includes/framework.php';
require_login();
if (!isset($form)) {
    $form = new AddAttendeeForm();
}
$badge_types = BadgeType::all();
$reg_levels = RegistrationLevel::all();
$tshirt_sizes = TShirtSize::all();
$payment_types = PaymentType::all();
$vendors = Vendor::all();
?>

<div class="row">
  <div class="form-group col-md-6 <?php 
echo $form->error_on("badge_name") ? "has-error" : "";
?>
">
    <?php 
echo label_tag("badge_name", "Badge Name");
?>
    <?php 
echo input_tag($form, "badge_name");
?>
    <?php 
echo error_display($form, "badge_name");
?>
  </div>

  <div class="form-group col-md-6 <?php 
开发者ID:epochwolf,项目名称:kairos,代码行数:31,代码来源:add-attendee-form.php

示例5: edit

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

示例6: allVendors

 public function allVendors()
 {
     $data = array('status' => 'ok', 'vendors' => Vendor::all());
     return $data;
 }
开发者ID:GeorgeBroadley,项目名称:caffeine-vendor,代码行数:5,代码来源:ApiController.php

示例7: index

 public function index()
 {
     $vendors = Vendor::all();
     return View::make('admin.vendors.index', compact('vendors'));
 }
开发者ID:shittyc0de,项目名称:AplikasiLC,代码行数:5,代码来源:VendorsController.php

示例8: require_login

<?php

include_once '../_includes/framework.php';
require_login();
$page_title = "Admin";
include "_partials/admin-header.php";
$query = Vendor::all();
$count = count($query);
?>

<div class="container">
  <div class="col-md-12">
    <h1>
      Vendors (<?php 
echo $count;
?>
)
    </h1>
    <table class="table table-striped table-condensed">
      <thead>
        <tr>
          <th>Name</th>
          <th>Assigned Table(s)</th>
          <th class="hidden-print">Badges</th>
        </tr>
      </thead>
      <tbody>
        <?php 
foreach ($query as $vendor) {
    ?>
          <tr data-id="<?php 
开发者ID:epochwolf,项目名称:kairos,代码行数:31,代码来源:vendors.php

示例9: error_display

    <?php 
echo error_display($form, "badge_type");
?>
  </div>

  <div class="form-group col-md-4 <?php 
echo $form->error_on("vendor_id") ? "has-error" : "";
?>
">
    <?php 
echo label_tag("vendor_id", "Vendor");
?>
    <select class="form-control" id="vendor_id" name="vendor_id">
      <option></option>
      <?php 
foreach (Vendor::all() as $vendor) {
    ?>
        <?php 
    echo option_tag($vendor->display_name(), @$form->params["vendor_id"], $vendor->id);
    ?>
      <?php 
}
?>
    </select>
    <?php 
echo error_display($form, "vendor_id");
?>
  </div>
</div>

<div class="row">
开发者ID:epochwolf,项目名称:kairos,代码行数:31,代码来源:check-in-form.php

示例10: index

 public static function index()
 {
     $vendors = Vendor::all();
     View::make('vendor/index.html', array('vendors' => $vendors));
 }
开发者ID:jackrl,项目名称:Tsoha-Bootstrap,代码行数:5,代码来源:vendors_controller.php


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