PoliciesFormUtil Class Reference

Static Public Member Functions

static makeFormFromPoliciesData ($data)
static setPoliciesFromCastedPost (array $validatedAndCastedPostData, $permitable)
static loadFormFromCastedPost (PoliciesForm $form, array $validatedAndCastedPostData)
static typeCastPostData ($postData)

Static Protected Member Functions

static getModuleClassNameFromPostConcatenatedIndexString ($string)
static getPolicyFromPostConcatenatedIndexString ($string)
static getPolicyIdFromPostConcatenatedIndexString ($string)
static getTypeFromPostConcatenatedIndexString ($string)
static AddorRemoveSpecificPolicy ($moduleClassName, $permitable, $policy, $value)

Detailed Description

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

Definition at line 41 of file PoliciesFormUtil.php.


Member Function Documentation

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

            <?php
                $data = array(
                    'UsersModule' => array(
                        'POLICY_ENFORCE_STRONG_PASSWORDS'   => array(
                            'displayName' => UsersModule::POLICY_ENFORCE_STRONG_PASSWORDS,
                            'explicit'    => Policy::YES,
                            'inherited'   => null,
                        ),
                        'POLICY_MINIMUM_PASSWORD_LENGTH'   => array(
                            'displayName' => UsersModule::POLICY_MINIMUM_PASSWORD_LENGTH,
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'POLICY_MINIMUM_USERNAME_LENGTH'   => array(
                            'displayName' => UsersModule::POLICY_MINIMUM_USERNAME_LENGTH,
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'POLICY_PASSWORD_EXPIRES'   => array(
                            'displayName' => UsersModule::POLICY_PASSWORD_EXPIRES,
                            'explicit'    => null,
                            'inherited'   => Policy::YES,
                        ),
                        'POLICY_PASSWORD_EXPIRY_DAYS'   => array(
                            'displayName' => UsersModule::POLICY_PASSWORD_EXPIRY_DAYS,
                            'explicit'    => null,
                            'inherited'   => 15,
                        ),
                    ),
                );
            ?>

Definition at line 81 of file PoliciesFormUtil.php.

static setPoliciesFromCastedPost ( array $  validatedAndCastedPostData,
permitable 
) [static]

Set permitable policies from post

Returns:
boolean - true on success

Definition at line 93 of file PoliciesFormUtil.php.

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

Definition at line 118 of file PoliciesFormUtil.php.

static getPolicyFromPostConcatenatedIndexString ( string  )  [static, protected]
Returns:
policy integer

Definition at line 129 of file PoliciesFormUtil.php.

static getPolicyIdFromPostConcatenatedIndexString ( string  )  [static, protected]
Returns:
policy id string

Definition at line 140 of file PoliciesFormUtil.php.

static getTypeFromPostConcatenatedIndexString ( string  )  [static, protected]
Returns:
type string

Definition at line 151 of file PoliciesFormUtil.php.

static loadFormFromCastedPost ( PoliciesForm form,
array $  validatedAndCastedPostData 
) [static]
Parameters:
PoliciesForm $form
array $validatedAndCastedPostData
Returns:
PoliciesForm
Exceptions:
NotSupportedException 

Definition at line 184 of file PoliciesFormUtil.php.

static typeCastPostData ( postData  )  [static]

Used to properly type cast incoming POST data

Definition at line 216 of file PoliciesFormUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jul 22 07:10:27 2017