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


PHP Helper::detailedAssetList方法代码示例

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


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

示例1: getCheckout

 /**
  * Returns a view that allows the checkout of a component to an asset.
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @see ComponentsController::postCheckout() method that stores the data.
  * @since [v3.0]
  * @param int $componentId
  * @return View
  */
 public function getCheckout($componentId)
 {
     // Check if the component exists
     if (is_null($component = Component::find($componentId))) {
         // Redirect to the component management page with error
         return redirect()->to('components')->with('error', trans('admin/components/message.not_found'));
     } elseif (!Company::isCurrentUserHasAccess($component)) {
         return redirect()->to('admin/components')->with('error', trans('general.insufficient_permissions'));
     }
     // Get the dropdown of assets and then pass it to the checkout view
     $assets_list = Helper::detailedAssetList();
     return View::make('components/checkout', compact('component'))->with('assets_list', $assets_list);
 }
开发者ID:stijni,项目名称:snipe-it,代码行数:22,代码来源:ComponentsController.php

示例2: getCreate

 /**
  *  Returns a form view to create a new asset maintenance.
  *
  * @see AssetMaintenancesController::postCreate() method that stores the data
  * @author  Vincent Sposato <vincent.sposato@gmail.com>
  * @version v1.0
  * @since [v1.8]
  * @return mixed
  */
 public function getCreate($assetId = null)
 {
     // Prepare Asset Maintenance Type List
     $assetMaintenanceType = ['' => 'Select an asset maintenance type'] + AssetMaintenance::getImprovementOptions();
     // Mark the selected asset, if it came in
     $selectedAsset = $assetId;
     $assets = Helper::detailedAssetList();
     $supplier_list = Helper::suppliersList();
     // Render the view
     return View::make('asset_maintenances/edit')->with('asset_list', $assets)->with('selectedAsset', $selectedAsset)->with('supplier_list', $supplier_list)->with('assetMaintenanceType', $assetMaintenanceType)->with('assetMaintenance', new AssetMaintenance());
 }
开发者ID:jbirdkerr,项目名称:snipe-it,代码行数:20,代码来源:AssetMaintenancesController.php

示例3: getCheckout

 /**
  * Provides the form view for checking out a license to a user.
  * Here we pass the license seat ID instead of the license ID,
  * because licenses themselves are never checked out to anyone,
  * only the seats associated with them.
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @since [v1.0]
  * @param int $seatId
  * @return View
  */
 public function getCheckout($seatId)
 {
     // Check if the license seat exists
     if (is_null($licenseseat = LicenseSeat::find($seatId))) {
         // Redirect to the asset management page with error
         return redirect()->to('admin/licenses')->with('error', trans('admin/licenses/message.not_found'));
     } elseif (!Company::isCurrentUserHasAccess($licenseseat->license)) {
         return redirect()->to('admin/licenses')->with('error', trans('general.insufficient_permissions'));
     }
     // Get the dropdown of users and then pass it to the checkout view
     $users_list = Helper::usersList();
     $assets = Helper::detailedAssetList();
     return View::make('licenses/checkout', compact('licenseseat'))->with('users_list', $users_list)->with('asset_list', $assets);
 }
开发者ID:jbirdkerr,项目名称:snipe-it,代码行数:25,代码来源:LicensesController.php


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