PermissionController extends SimpleController
Controller class for permission-related requests, including listing permissions, CRUD for permissions, etc.
Basic controller class, that imports the entire DI container for easy access to services. Your controller classes may extend this controller class.
Tags
Table of Contents
$ci | ContainerInterface | |
---|---|---|
getInfo() | Returns info for a single permission. | mixed |
getList() | Returns a list of Permissions. | mixed |
getUsers() | Returns a list of Users for a specified Permission. | mixed |
pageInfo() | Renders a page displaying a permission's information, in read-only mode. | mixed |
pageList() | Renders the permission listing page. | mixed |
__construct() | Constructor. | mixed |
Properties
$ci
protected
ContainerInterface
$ci
Methods
getInfo()
Returns info for a single permission.
public
getInfo(
$request :
ServerRequestInterface
, $response :
ResponseInterface
, $args :
array
)
: mixed
This page requires authentication.
Request type: GET
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $args : array
Tags
Return values
mixedgetList()
Returns a list of Permissions.
public
getList(
$request :
ServerRequestInterface
, $response :
ResponseInterface
, $args :
array
)
: mixed
Generates a list of permissions, optionally paginated, sorted and/or filtered. This page requires authentication.
Request type: GET
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $args : array
Tags
Return values
mixedgetUsers()
Returns a list of Users for a specified Permission.
public
getUsers(
$request :
ServerRequestInterface
, $response :
ResponseInterface
, $args :
array
)
: mixed
Generates a list of users, optionally paginated, sorted and/or filtered. This page requires authentication.
Request type: GET
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $args : array
Tags
Return values
mixedpageInfo()
Renders a page displaying a permission's information, in read-only mode.
public
pageInfo(
$request :
ServerRequestInterface
, $response :
ResponseInterface
, $args :
array
)
: mixed
This checks that the currently logged-in user has permission to view permissions. Note that permissions cannot be modified through the interface. This is because permissions are tighly coupled to the code and should only be modified by developers. This page requires authentication.
Request type: GET
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $args : array
Tags
Return values
mixedpageList()
Renders the permission listing page.
public
pageList(
$request :
ServerRequestInterface
, $response :
ResponseInterface
, $args :
array
)
: mixed
This page renders a table of permissions, with dropdown menus for admin actions for each permission. Actions typically include: edit permission, delete permission. This page requires authentication.
Request type: GET
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $args : array
Tags
Return values
mixed__construct()
Constructor.
public
__construct(
$ci :
ContainerInterface
)
: mixed
Parameters
- $ci : ContainerInterface
The global container object, which holds all your services.