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


PHP Permission::preparePermissionsForDisplay方法代碼示例

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


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

示例1: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param $map
  * @return Response
  */
 public function getEdit($map)
 {
     if (!empty($map)) {
         $permissions = $this->permission->preparePermissionsForDisplay($map->perms()->get());
     } else {
         return Api::to(array('error', Lang::get('admin/maps/messages.does_not_exist'))) ?: Redirect::to('admin/maps')->with('error', Lang::get('admin/maps/messages.does_not_exist'));
     }
     $title = Lang::get('admin/maps/title.role_update');
     return Theme::make('admin/maps/edit', compact('map', 'permissions', 'title'));
 }
開發者ID:Aranjedeath,項目名稱:l4-starter,代碼行數:16,代碼來源:AdminMapsController.php

示例2: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param $role
  * @return Response
  */
 public function getEdit($role)
 {
     if (!empty($role)) {
         $permissions = $this->permission->preparePermissionsForDisplay($role->perms()->get());
     } else {
         return Redirect::to('admin/roles')->with('error', Lang::get('admin/roles/messages.does_not_exist'));
     }
     $title = Lang::get('admin/roles/title.role_update');
     return View::make('admin/roles/edit', compact('role', 'permissions', 'title'));
 }
開發者ID:ntk148v,項目名稱:mini_cms,代碼行數:16,代碼來源:AdminRolesController.php

示例3: delete

 /**
  * Remove user page.
  *
  * @param $role
  * @return Response
  */
 public function delete($role)
 {
     // Title
     $title = Lang::get('admin/role/title.role_delete');
     if ($role->id) {
         $permissions = $this->permission->preparePermissionsForDisplay($role->perms()->get());
     } else {
         // Redirect to the role management page
         return Redirect::to('admin/roles')->with('error', Lang::get('admin/role/messages.does_not_exist'));
     }
     // Show the record
     return View::make('admin/role/delete', compact('role', 'permissions', 'title'));
 }
開發者ID:ehumps,項目名稱:rendezview,代碼行數:19,代碼來源:AdminRolesController.php

示例4: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param $role
  * @return Response
  */
 public function edit($id)
 {
     $role = Role::find($id);
     if (!empty($role)) {
         $permissions = $this->permission->preparePermissionsForDisplay($role->perms()->get());
     } else {
         // Redirect to the roles management page
         return Redirect::to('admin.roles')->with('error', Lang::get('admin/roles/messages.does_not_exist'));
     }
     // Title
     $title = Lang::get('admin/roles/title.role_update');
     // Show the page
     $this->render('admin/roles/edit', compact('role', 'permissions', 'title'));
 }
開發者ID:christiannwamba,項目名稱:laravel-site,代碼行數:20,代碼來源:AdminRolesController.php


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