RightsFormUtil Class Reference

Static Public Member Functions

static makeFormFromRightsData ($rightsData)
static setRightsFromCastedPost (array $validatedAndCastedPostData, $permitable)
static typeCastPostData ($postData)

Static Protected Member Functions

static AddorRemoveSpecificRight ($moduleClassName, $permitable, $right, $value)
static getModuleClassNameFromPostConcatenatedIndexString ($string)
static getRightFromPostConcatenatedIndexString ($string)

Detailed Description

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

Definition at line 41 of file RightsFormUtil.php.

Member Function Documentation

static makeFormFromRightsData ( rightsData  )  [static]
$data - combined array of all module rights and existing rights on a permitable. Organized by module. Example below:

                $moduleRightsData = array(
                    'UsersModule' => array(
                        'RIGHT_MANAGE_USERS' => array(
                            'displayName' => UsersModule::RIGHT_MANAGE_USERS,
                            'selected'    => null,
                            'inherited'   => null,
                        'RIGHT_LOGIN_VIA_WEB'  => array(
                            'displayName' => UsersModule::RIGHT_LOGIN_VIA_WEB,
                            'selected'    => null,
                            'inherited'   => null,
                        'RIGHT_LOGIN_VIA_MOBILE' => array(
                            'displayName' => UsersModule::RIGHT_LOGIN_VIA_MOBILE,
                            'selected'    => null,
                            'inherited'   => null,
                        'RIGHT_LOGIN_VIA_WEB_API'   => array(
                            'displayName' => UsersModule::RIGHT_LOGIN_VIA_WEB_API,
                            'selected'    => null,
                            'inherited'   => null,

Definition at line 76 of file RightsFormUtil.php.

static setRightsFromCastedPost ( array $  validatedAndCastedPostData,
) [static]

Set Permitable Rights from Post

boolean - true on success

Definition at line 88 of file RightsFormUtil.php.

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

Definition at line 136 of file RightsFormUtil.php.

static getRightFromPostConcatenatedIndexString ( string  )  [static, protected]
right string

Definition at line 147 of file RightsFormUtil.php.

static typeCastPostData ( postData  )  [static]

Used to properly type cast incoming POST data

Definition at line 158 of file RightsFormUtil.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Jan 17 07:11:13 2020