All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
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_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,
  $permitable 
)
static

Set Permitable Rights from Post

Returns
boolean - true on success

Definition at line 88 of file RightsFormUtil.php.

static getModuleClassNameFromPostConcatenatedIndexString (   $string)
staticprotected
Returns
$moduleClassName string

Definition at line 136 of file RightsFormUtil.php.

static getRightFromPostConcatenatedIndexString (   $string)
staticprotected
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:
Generated on Tue Feb 18 2020 07:10:52