View permission
@param  int $id
@return Response
172011
public function show($id)
    {
        // get permission by id
        $permission = Permission::find($id);

        if (!$permission) {
            return response()->json(null, 404);
        }

        return response()->json(arrayView('phpsoft.users::permission/read', [
            'permission' => $permission
        ]), 200);
    }
273440
public function view(string $id = null)
    {
        $permission = $this->Permissions->get($id);

        $this->set('permission', $permission);
        $this->set('_serialize', ['permission']);
    }
71950
public function actionView($id)
    {
        $model = $this->findModel($id);
        $authManager = Yii::$app->getAuthManager();
        $avaliable = $assigned = [
            'Roles' => [],
            'Permission' => [],
            'Routes' => [],
        ];
        $children = array_keys($authManager->getChildren($id));
        $children[] = $id;
        foreach ($authManager->getRoles() as $name => $role) {
            if (in_array($name, $children)) {
                continue;
            }
            $avaliable['Roles'][$name] = $name;
        }
        foreach ($authManager->getPermissions() as $name => $role) {
            if (in_array($name, $children)) {
                continue;
            }
            $avaliable[$name[0] === '/' ? 'Routes' : 'Permission'][$name] = $name;
        }

        foreach ($authManager->getChildren($id) as $name => $child) {
            if ($child->type == Item::TYPE_ROLE) {
                $assigned['Roles'][$name] = $name;
            } else {
                $assigned[$name[0] === '/' ? 'Routes' : 'Permission'][$name] = $name;
            }
        }
        $avaliable = array_filter($avaliable);
        $assigned = array_filter($assigned);
        return $this->render('view', ['model' => $model, 'avaliable' => $avaliable, 'assigned' => $assigned]);
    }
4502
public function actionView(int $id)
    {
        $model = $this->findModel($id);

        return $this->render('view', [
            'model' => $model,
            'usernameField' => $this->usernameField,
        ]);
    }
1353136
public function show(Request $request, $id)
    {
        // Set roles that have access
        $request->user()->authorizeRoles(['admin']);

        $pagetype = PageType::findOrFail($id);
        $fields = $pagetype->fields;
        return view('page::pagetypes.show', ['pagetype' => $pagetype, 'fields' => $fields]);
    }
1171074
public function show($id)
	{
		if ( Shinobi::canAtLeast( [ config('watchtower.acl.role.edit', false),  config('watchtower.acl.role.show', false)] ) ) {
			$resource = Role::findOrFail($id);
			$show = "1";
			$route = $this->route;
			return view( config('watchtower.views.roles.show'), compact('resource','show','route') );
		}

		return view( config('watchtower.views.layouts.unauthorized'), [ 'message' => 'view roles' ]);
	}
228
public function hasPermissionForId($id)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $permission = $em->getRepository('\\Zepi\\Core\\AccessControl\\Entity\\Permission')->find($id);
            
            if ($permission !== null) {
                return true;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot check if there is a permission for the given id "' . $id . '".', 0, $e);
        }
    }
968283
public function viewAction($id)
    {
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }

        return $this->render($this->getParameter('opifer_form.post_view_view'), [
            'post' => $post,
        ]);
    }
283645
public function getAction($id)
    {
        $manager = $this->getTaskManager();

        return $this->handleView($this->view($manager->findById($id)));
    }
882864
public function getShow($id)
    {
        $response = $this->modelService->getBy($id);

        //return resource listing view
        return view(\OogleeUConfig::get('config.user_view.view'), compact('response'));
        
    }
1144462
public function preview($id)
	{
		if ( ! $this->auth->check())
		{
			return App::abort(404, 'Page not found');
		}

		return View::make($this->theme.'.preview', array('id' => $id));
	}
999860
public function edit($id)
    {
        $notification = $this->service->find($id);
        return view('admin.notifications.edit')->with('notification', $notification);
    }
792801
public function view($id)
    {
        $file = LocalFile::getByIdentifier($id);

        $response = response($file->getContents(), 200)->withHeaders([
            'Content-Type'  => $file->getFile()->getMimeType(),
            'Cache-Control' => 'max-age=86400, public',
            'Expires'       => Carbon::now()->addSeconds(86400)->format('D, d M Y H:i:s \G\M\T')
        ]);
        return $response;
    }
410051
public function view($id = null)
    {
        $role = $this->Roles->get($id, [
            'contain' => []
        ]);
        $this->set('role', $role);

        $this->render(Configure::read('CM.AdminRoleViews.view'));
    }
1347229
public function show($id)
    {
        // get role by id
        $role = Role::find($id);

        if (!$role) {
            return response()->json(null, 404);
        }

        return response()->json(arrayView('phpsoft.users::role/read', [
            'role' => $role
        ]), 200);
    }
550857
public function edit($id)
    {
        if (!$role = $this->roleRepositoryInterface->getById($id)) {
            Flash::error(trans('dashboard::dashboard.errors.role.found'));

            return redirect()->route('roles.index');
        }

        $permissions = $this->permissionRepositoryInterface->getAll();

        return $this->view('roles.edit')->with(['role' => $role, 'permissions' => $permissions]);
    }
20186
public function indexByUser($id)
    {
        $user = \App\User::find($id);

        if (!$user) {
            return response()->json(null, 404);
        }

        $roles = Role::browseByUser([
            'order'     => [ Input::get('sort', 'name') => Input::get('direction', 'asc') ],
            'limit'     => ($limit = (int)Input::get('limit', 25)),
            'offset'    => (Input::get('page', 1) - 1) * $limit,
            'user'      => $user
        ]);

        return response()->json(arrayView('phpsoft.users::role/browse', [
            'roles' => $roles,
        ]), 200);
    }