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]
$modulesPermissionsData - combined array of all permission and existing permissions on a permittable. Organized by module. Example below showing just the accounts module:

                $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,
) [static]

Set Module Permissions from Post

boolean - true on success

Definition at line 92 of file ModulePermissionsFormUtil.php.

static getModuleClassNameFromPostConcatenatedIndexString ( string  )  [static, protected]
$moduleClassName string

Definition at line 112 of file ModulePermissionsFormUtil.php.

static getPermissionFromPostConcatenatedIndexString ( string  )  [static, protected]
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:
 All Data Structures Functions Variables
Generated on Wed Nov 13 07:10:58 2019