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


PHP Helper::manufacturerList方法代码示例

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


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

示例1: getClone

 /**
  * Returns a view that presents a form to clone an asset.
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @param int $assetId
  * @since [v1.0]
  * @return View
  */
 public function getClone($assetId = null)
 {
     // Check if the asset exists
     if (is_null($asset_to_clone = Asset::find($assetId))) {
         // Redirect to the asset management page
         return redirect()->to('hardware')->with('error', trans('admin/hardware/message.does_not_exist'));
     } elseif (!Company::isCurrentUserHasAccess($asset_to_clone)) {
         return redirect()->to('hardware')->with('error', trans('general.insufficient_permissions'));
     }
     // Grab the dropdown lists
     $model_list = Helper::modelList();
     $statuslabel_list = Helper::statusLabelList();
     $location_list = Helper::locationsList();
     $manufacturer_list = Helper::manufacturerList();
     $category_list = Helper::categoryList('asset');
     $supplier_list = Helper::suppliersList();
     $assigned_to = Helper::usersList();
     $statuslabel_types = Helper::statusTypeList();
     $company_list = Helper::companyList();
     $asset = clone $asset_to_clone;
     $asset->id = null;
     $asset->asset_tag = '';
     $asset->serial = '';
     $asset->assigned_to = '';
     return View::make('hardware/edit')->with('supplier_list', $supplier_list)->with('model_list', $model_list)->with('statuslabel_list', $statuslabel_list)->with('statuslabel_types', $statuslabel_types)->with('assigned_to', $assigned_to)->with('asset', $asset)->with('location_list', $location_list)->with('manufacturer', $manufacturer_list)->with('category', $category_list)->with('company_list', $company_list);
 }
开发者ID:stijni,项目名称:snipe-it,代码行数:34,代码来源:AssetsController.php

示例2: getEdit

 /**
  * Returns a form view to edit a consumable.
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @param  int $consumableId
  * @see ConsumablesController::postEdit() method that stores the form data.
  * @since [v1.0]
  * @return View
  */
 public function getEdit($consumableId = null)
 {
     // Check if the consumable exists
     if (is_null($consumable = Consumable::find($consumableId))) {
         // Redirect to the blogs management page
         return redirect()->to('admin/consumables')->with('error', trans('admin/consumables/message.does_not_exist'));
     } elseif (!Company::isCurrentUserHasAccess($consumable)) {
         return redirect()->to('admin/consumables')->with('error', trans('general.insufficient_permissions'));
     }
     $category_list = Helper::categoryList('consumable');
     $company_list = Helper::companyList();
     $location_list = Helper::locationsList();
     $manufacturer_list = Helper::manufacturerList();
     return View::make('consumables/edit', compact('consumable'))->with('category_list', $category_list)->with('company_list', $company_list)->with('location_list', $location_list)->with('manufacturer_list', $manufacturer_list);
 }
开发者ID:jbirdkerr,项目名称:snipe-it,代码行数:24,代码来源:ConsumablesController.php

示例3: getClone

 /**
  * Get the clone page to clone a model
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @since [v1.0]
  * @param int $modelId
  * @return View
  */
 public function getClone($modelId = null)
 {
     // Check if the model exists
     if (is_null($model_to_clone = AssetModel::find($modelId))) {
         // Redirect to the model management page
         return redirect()->to('assets/models')->with('error', trans('admin/models/message.does_not_exist'));
     }
     $model = clone $model_to_clone;
     $model->id = null;
     // Show the page
     $depreciation_list = Helper::depreciationList();
     $manufacturer_list = Helper::manufacturerList();
     $category_list = Helper::categoryList('asset');
     $view = View::make('models/edit');
     $view->with('category_list', $category_list);
     $view->with('depreciation_list', $depreciation_list);
     $view->with('manufacturer_list', $manufacturer_list);
     $view->with('model', $model);
     $view->with('clone_model', $model_to_clone);
     return $view;
 }
开发者ID:dmeltzer,项目名称:snipe-it,代码行数:29,代码来源:AssetModelsController.php

示例4: getClone

 public function getClone($licenseId = null)
 {
     // Check if the license exists
     if (is_null($license_to_clone = License::find($licenseId))) {
         // Redirect to the blogs management page
         return redirect()->to('admin/licenses')->with('error', trans('admin/licenses/message.does_not_exist'));
     } elseif (!Company::isCurrentUserHasAccess($license_to_clone)) {
         return redirect()->to('admin/licenses')->with('error', trans('general.insufficient_permissions'));
     }
     // Show the page
     $license_options = array('0' => 'Top Level') + License::pluck('name', 'id')->toArray();
     $maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
     $company_list = Helper::companyList();
     //clone the orig
     $license = clone $license_to_clone;
     $license->id = null;
     $license->serial = null;
     // Show the page
     $depreciation_list = Helper::depreciationList();
     $supplier_list = Helper::suppliersList();
     return View::make('licenses/edit')->with('license_options', $license_options)->with('depreciation_list', $depreciation_list)->with('supplier_list', $supplier_list)->with('license', $license)->with('maintained_list', $maintained_list)->with('company_list', $company_list)->with('manufacturer_list', Helper::manufacturerList());
 }
开发者ID:stijni,项目名称:snipe-it,代码行数:22,代码来源:LicensesController.php

示例5: getEdit

 /**
  * Return view for the Accessory update form, prepopulated with existing data
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @param  int  $accessoryId
  * @return View
  */
 public function getEdit(Request $request, $accessoryId = null)
 {
     // Check if the accessory exists
     if (is_null($accessory = Accessory::find($accessoryId))) {
         // Redirect to the blogs management page
         return redirect()->to('admin/accessories')->with('error', trans('admin/accessories/message.does_not_exist'));
     } elseif (!Company::isCurrentUserHasAccess($accessory)) {
         return redirect()->to('admin/accessories')->with('error', trans('general.insufficient_permissions'));
     }
     return View::make('accessories/edit', compact('accessory'))->with('category_list', Helper::categoryList('accessory'))->with('company_list', Helper::companyList())->with('location_list', Helper::locationsList())->with('manufacturer_list', Helper::manufacturerList());
 }
开发者ID:stijni,项目名称:snipe-it,代码行数:18,代码来源:AccessoriesController.php


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