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

GroupUserMembershipFormUtil Class Reference

Static Public Member Functions

static typeCastPostData ($postData)
static makeFormFromGroup ($group)
static validateMembershipChange (GroupUserMembershipForm $form, Group $group)
static setMembershipFromForm ($form, $group)
static setFormFromCastedPost (GroupUserMembershipForm $membershipForm, array $postData)

Static Protected Member Functions

static makeUserMembershipDataFromUsers ($users)
static makeUsersFromUserMembershipData (array $userData)
static makeNonUserMembershipDataFromUserMembershipData (array $userData)

Detailed Description

Helper class to create a form from a group's membership data. Also allows for setting membership on a group from a form.

Definition at line 42 of file GroupUserMembershipFormUtil.php.


Member Function Documentation

static typeCastPostData ( postData  )  [static]

Used to properly type cast incoming POST data

Definition at line 47 of file GroupUserMembershipFormUtil.php.

static makeFormFromGroup ( group  )  [static]
Parameters:
$group 
Returns:
GroupUserMembershipForm

Definition at line 64 of file GroupUserMembershipFormUtil.php.

static validateMembershipChange ( GroupUserMembershipForm form,
Group group 
) [static]
Parameters:
GroupUserMembershipForm $form
Group $group
Returns:
null|string $message. If message present than validation failed.

Definition at line 82 of file GroupUserMembershipFormUtil.php.

static setMembershipFromForm ( form,
group 
) [static]

Takes post data and prepares it for setting the membership on the group. Adds and removes users to group based on a form's userMembershipData

Parameters:
$form 
$group 
Returns:
boolean. True if membership was set successfully.

Definition at line 107 of file GroupUserMembershipFormUtil.php.

static setFormFromCastedPost ( GroupUserMembershipForm membershipForm,
array $  postData 
) [static]

Set the userMembershipData attribute on the GroupUserMembershipForm

Parameters:
GroupUserMembershipForm $membershipForm
array $postData
Returns:
GroupUserMembershipForm

Definition at line 159 of file GroupUserMembershipFormUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sun Mar 24 07:10:51 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