当前位置: 首页>>代码示例>>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;未经允许,请勿转载。