當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Helper::locationsList方法代碼示例

本文整理匯總了PHP中app\helpers\Helper::locationsList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper::locationsList方法的具體用法?PHP Helper::locationsList怎麽用?PHP Helper::locationsList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\helpers\Helper的用法示例。


在下文中一共展示了Helper::locationsList方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getIndex

 /**
  * Returns a view with the user's profile form for editing
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @since [v1.0]
  * @return View
  */
 public function getIndex()
 {
     // Get the user information
     $user = Auth::user();
     $location_list = Helper::locationsList();
     return View::make('account/profile', compact('user'))->with('location_list', $location_list);
 }
開發者ID:dmeltzer,項目名稱:snipe-it,代碼行數:14,代碼來源:ProfileController.php

示例2: postBulkEdit

 /**
  * Display the bulk edit page.
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @param  int  $assetId
  * @since [v2.0]
  * @return View
  */
 public function postBulkEdit($assets = null)
 {
     if (!Company::isCurrentUserAuthorized()) {
         return redirect()->to('hardware')->with('error', trans('general.insufficient_permissions'));
     } elseif (!Input::has('edit_asset')) {
         return redirect()->back()->with('error', 'No assets selected');
     } else {
         $asset_raw_array = Input::get('edit_asset');
         foreach ($asset_raw_array as $asset_id => $value) {
             $asset_ids[] = $asset_id;
         }
     }
     if (Input::has('bulk_actions')) {
         // Create labels
         if (Input::get('bulk_actions') == 'labels') {
             $settings = Setting::getSettings();
             $assets = Asset::find($asset_ids);
             $count = 0;
             return View::make('hardware/labels')->with('assets', $assets)->with('settings', $settings)->with('count', $count)->with('settings', $settings);
         } elseif (Input::get('bulk_actions') == 'delete') {
             $assets = Asset::with('assigneduser', 'assetloc')->find($asset_ids);
             return View::make('hardware/bulk-delete')->with('assets', $assets);
             // Bulk edit
         } elseif (Input::get('bulk_actions') == 'edit') {
             $assets = Input::get('edit_asset');
             $supplier_list = Helper::suppliersList();
             $statuslabel_list = Helper::statusLabelList();
             $location_list = Helper::locationsList();
             $models_list = Helper::modelList();
             $companies_list = array('' => '') + array('clear' => trans('general.remove_company')) + Helper::companyList();
             return View::make('hardware/bulk')->with('assets', $assets)->with('supplier_list', $supplier_list)->with('statuslabel_list', $statuslabel_list)->with('location_list', $location_list)->with('models_list', $models_list)->with('companies_list', $companies_list);
         }
     } else {
         return redirect()->back()->with('error', 'No action selected');
     }
 }
開發者ID:stijni,項目名稱:snipe-it,代碼行數:44,代碼來源:AssetsController.php

示例3: 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'));
     }
     $category_list = Helper::categoryList('accessory');
     $company_list = Helper::companyList();
     $location_list = Helper::locationsList();
     return View::make('accessories/edit', compact('accessory'))->with('category_list', $category_list)->with('company_list', $company_list)->with('location_list', $location_list);
 }
開發者ID:dmeltzer,項目名稱:snipe-it,代碼行數:21,代碼來源:AccessoriesController.php

示例4: 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

示例5: getLDAP

 /**
  * Return view for LDAP import
  *
  * @author Aladin Alaily
  * @since [v1.8]
  * @return View
  */
 public function getLDAP()
 {
     $location_list = Helper::locationsList();
     try {
         $ldapconn = Ldap::connectToLdap();
     } catch (\Exception $e) {
         return redirect()->route('users')->with('error', $e->getMessage());
     }
     try {
         Ldap::bindAdminToLdap($ldapconn);
     } catch (\Exception $e) {
         return redirect()->route('users')->with('error', $e->getMessage());
     }
     return View::make('users/ldap')->with('location_list', $location_list);
 }
開發者ID:stijni,項目名稱:snipe-it,代碼行數:22,代碼來源:UsersController.php


注:本文中的app\helpers\Helper::locationsList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。