當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。