Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

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  )  [static, protected]
Returns:
$moduleClassName string

Definition at line 112 of file ModulePermissionsFormUtil.php.

static getPermissionFromPostConcatenatedIndexString ( string  )  [static, protected]
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:
 All Data Structures Functions Variables
Generated on Sat Mar 23 07:10:56 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8