All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
ModulePermissionsFormUtil Class Reference

Static Public Member Functions

static makeFormFromPermissionsData ($data)
 
static setPermissionsFromCastedPost (array $validatedAndCastedPostData, $permitable)
 
static typeCastPostData ($postData)
 

Static Protected Member Functions

static getModuleClassNameFromPostConcatenatedIndexString ($string)
 
static getPermissionFromPostConcatenatedIndexString ($string)
 
static addOrRemoveSpecificPermission ($moduleClassName, $permitable, $permission, $value)
 

Detailed Description

Helper class to make a ModulePermissionsForm and populate the data attribute.

Definition at line 41 of file ModulePermissionsFormUtil.php.

Member Function Documentation

static makeFormFromPermissionsData (   $data)
static
Parameters
$modulesPermissionsData- combined array of all permission and existing permissions on a permittable. Organized by module. Example below showing just the accounts module:
<?php
$modulePermissionsData = array(
'accounts' => array(
'CREATE' => array(
'explicit' => null,
'inherited' => null,
),
'CHANGE_OWNER' => array(
'explicit' => null,
'inherited' => null,
),
'CHANGE_PERMISSIONS' => array(
'explicit' => null,
'inherited' => null,
),
'DELETE' => array(
'explicit' => null,
'inherited' => null,
),
'READ' => array(
'explicit' => null,
'inherited' => Permission::ALLOW,
),
'WRITE' => array(
'explicit' => null,
'inherited' => Permission::DENY,
),
),
);
?>

Definition at line 80 of file ModulePermissionsFormUtil.php.

static setPermissionsFromCastedPost ( array  $validatedAndCastedPostData,
  $permitable 
)
static

Set Module Permissions from Post

Returns
boolean - true on success

Definition at line 92 of file ModulePermissionsFormUtil.php.

static getModuleClassNameFromPostConcatenatedIndexString (   $string)
staticprotected
Returns
$moduleClassName string

Definition at line 112 of file ModulePermissionsFormUtil.php.

static getPermissionFromPostConcatenatedIndexString (   $string)
staticprotected
Returns
intval permission

Definition at line 123 of file ModulePermissionsFormUtil.php.

static typeCastPostData (   $postData)
static

Used to properly type cast incoming POST data

Definition at line 167 of file ModulePermissionsFormUtil.php.


The documentation for this class was generated from the following file:
Generated on Mon Jun 1 2020 07:10:55