ManagerolesElement
extends Element
in package
Used to draw the admin screen on which admin users can create roles, delete roles and add and delete activitiess from roles
Tags
Table of Contents
- $view : object
- The View on which this Element is drawn
- __construct() : mixed
- constructor stores a reference to the view this element will reside on
- formatHref() : string
- Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
- render() : mixed
- renders the screen in which roles can be created, deleted, and activities can be added to and deleted from a selected roles
- renderRoleForm() : mixed
- Draws the add role and edit role forms
- renderRoleTable() : mixed
- Draws the table to display thhe currently available roles and their properties in this Yioop system
- renderSearchForm() : mixed
- Draws the search for roles forms
Properties
$view
The View on which this Element is drawn
public
object
$view
Methods
__construct()
constructor stores a reference to the view this element will reside on
public
__construct([object $view = null ]) : mixed
Parameters
- $view : object = null
-
object this element will reside on
Return values
mixed —formatHref()
Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
public
formatHref(string $url) : string
Parameters
- $url : string
-
to clean up
Return values
string —cleaned url
render()
renders the screen in which roles can be created, deleted, and activities can be added to and deleted from a selected roles
public
render(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
contains antiCSRF token, as well as data on available roles or which activity has what role
Return values
mixed —renderRoleForm()
Draws the add role and edit role forms
public
renderRoleForm(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
consists of values of role fields set so far as well as values of the drops downs on the form
Return values
mixed —renderRoleTable()
Draws the table to display thhe currently available roles and their properties in this Yioop system
public
renderRoleTable(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
info about current users and current roles, CSRF token
Return values
mixed —renderSearchForm()
Draws the search for roles forms
public
renderSearchForm(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
consists of values of role fields set so far as well as values of the drops downs on the form