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]
Parameters:
$data - combined array of all module rights and existing rights on a permitable. Organized by module. Example below:

            <?php
                $moduleRightsData = array(
                    'UsersModule' => array(
                        'RIGHT_CHANGE_USER_PASSWORDS' => array(
                            'displayName' => UsersModule::RIGHT_CHANGE_USER_PASSWORDS,
                            '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,
permitable 
) [static]

Set Permitable Rights from Post

Returns:
boolean - true on success

Definition at line 88 of file RightsFormUtil.php.

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

Definition at line 136 of file RightsFormUtil.php.

static getRightFromPostConcatenatedIndexString ( string  )  [static, protected]
Returns:
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 Nov 24 07:10:29 2017