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

ModelForm Class Reference

Inheritance diagram for ModelForm:
ContactWebFormsModelForm CreateEmailMessageForm SearchForm UserAvatarForm UserEmailConfigurationForm UserPasswordForm UserSendGridConfigurationForm ContactStateSearchForm CurrenciesSearchForm DynamicSearchForm GroupsSearchForm ImagesSearchForm MarketingListMembersSearchForm RolesSearchForm WorkflownQueuesSearchForm

Public Member Functions

 __construct (RedBeanModel $model)
 getModel ()
 __toString ()
 __set ($name, $value)
 __get ($name)
 getMetadata ()
 isAttribute ($attributeName)
 isAttributeRequired ($attribute)
 attributeNames ()
 getAttributeLabel ($attribute)
 setAttributes ($values, $safeOnly=true)
 validate ($attributes=null, $clearErrors=true)
 getValidators ($attribute=null)
 getErrors ($attributeNameOrNames=null)
 hasErrors ($attributeNameOrNames=null)
 save ($runValidation=true, array $attributeNames=null)
 getError ($attribute)

Static Public Member Functions

static isOwnedRelation ($attributeName)
static isRelation ($attributeName)
static getRelationModelClassName ($relationName)

Static Protected Member Functions

static getRedBeanModelClassName ()
static shouldIgnoreRequiredValidator ()

Protected Attributes

 $model

Detailed Description

Provides an interface that is the same as a RedBeanModel interface, but allows developer to extend RedBeanModel with additional attributes that are not part of the model.

Definition at line 42 of file ModelForm.php.


Member Function Documentation

getMetadata (  ) 

Interface to mimic model getMetadata method. Can only be called non-statically since the model is required.

Reimplemented in SearchForm.

Definition at line 97 of file ModelForm.php.

static isOwnedRelation ( attributeName  )  [static]

If the attribute exists on the form, then assume it is not a relation since the form does not support relational attributes.

Definition at line 106 of file ModelForm.php.

static isRelation ( attributeName  )  [static]

If the attribute exists on the form, then assume it is not a relation since the form does not support relational attributes.

Reimplemented in SearchForm.

Definition at line 120 of file ModelForm.php.

static getRelationModelClassName ( relationName  )  [static]

If the attribute exists on the form, then assume it is not a relation since the form does not support relational attributes.

Reimplemented in SearchForm.

Definition at line 134 of file ModelForm.php.

isAttribute ( attributeName  ) 

Returns true if the named attribute is a property on this model.

Reimplemented in SearchForm.

Definition at line 148 of file ModelForm.php.

isAttributeRequired ( attribute  ) 

Override to properly check if the attribute is required or not. (non-PHPdoc)

See also:
CModel::isAttributeRequired()

Reimplemented in SearchForm, and ContactWebFormsModelForm.

Definition at line 164 of file ModelForm.php.

attributeNames (  ) 

Returns the list of attribute names. By default, this method returns all public properties of the class. You may override this method to change the default.

Returns:
array list of attribute names. Defaults to all public properties of the class.

Reimplemented in SearchForm.

Definition at line 179 of file ModelForm.php.

setAttributes ( values,
safeOnly = true 
)

Override of setAttributes in CModel to support setting attributes into this form as well as the related model. Splits $values into two arrays. First array is name/value pairs of attributes on this form, whereas the second array is name/value pairs on the model.

Reimplemented in SearchForm.

Definition at line 219 of file ModelForm.php.

validate ( attributes = null,
clearErrors = true 
)

Performs validation on this form and the model. clearErrors is not supported, because the model does not support this parameter in the RedBeanModel->validate() function. Currently this method does not support specifying the $attributes parameter.

Definition at line 244 of file ModelForm.php.

getValidators ( attribute = null  ) 

Override to properly get validators for an attribute when they are on the model. Todo: Factor in scenario for model attributes. (non-PHPdoc)

See also:
CModel::getValidators()

Definition at line 263 of file ModelForm.php.

static shouldIgnoreRequiredValidator (  )  [static, protected]

Override and set to true if you need to ignore the required validator.

Reimplemented in SearchForm.

Definition at line 275 of file ModelForm.php.

getErrors ( attributeNameOrNames = null  ) 

Return array of errors on form and model. Currently this method does not support specifying the $attributeNameOrNames parameter.

Definition at line 284 of file ModelForm.php.

hasErrors ( attributeNameOrNames = null  ) 
Returns:
true/false. If the form and/or the model has any errors. Currently this method does not support specifying the $attributeNameOrNames parameter.

Definition at line 295 of file ModelForm.php.

save ( runValidation = true,
array $  attributeNames = null 
)

Saves the model.

Reimplemented in UserSendGridConfigurationForm, and UserEmailConfigurationForm.

Definition at line 308 of file ModelForm.php.

getError ( attribute  ) 

Override to fix the defect where modelform consist of a model whose attributes are displayed on the form.

See also:
UserConfigurationForm or UserSendGridConfigurationForm
Parameters:
string $attribute attribute name.
Returns:
string the error message. Null is returned if no error.

Definition at line 324 of file ModelForm.php.


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