All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Attributes
AttributeForm Class Reference
Inheritance diagram for AttributeForm:
ConfigurableMetadataModel AddressAttributeForm CalculatedNumberAttributeForm CheckBoxAttributeForm ContactStateAttributeForm ContactWebFormAttributeForm CurrencyValueAttributeForm DateAttributeForm DateTimeAttributeForm DropDownAttributeForm DropDownDependencyAttributeForm EmailAddressInformationAttributeForm HasOneModelAttributeForm MaxLengthAttributeForm ProductTemplatePriceFrequencyDropDownAttributeForm ProductTemplateStatusDropDownAttributeForm ProductTemplateTypeDropDownAttributeForm ProjectStatusDropDownAttributeForm SellPriceFormulaInformationAttributeForm TaskStatusDropDownAttributeForm TextAreaAttributeForm

Public Member Functions

 __construct (RedBeanModel $model=null, $attributeName=null)
 __toString ()
 rules ()
 attributeLabels ()
 canUpdateAttributeProperty ($propertyName)
 getAttributeTypeName ()
 getModelAttributePartialRule ()
 validateAttributeNameDoesNotExists ()
 validateIsAttributeNameDatabaseReservedWord ()
 validateAttributeDoesNotContainReservedCharacters ()
 validateAttributeLabels ($attribute, $params)
 setModelClassName ($modelClassName)
 getModelClassName ()
 sanitizeFromPostAndSetAttributes ($values)

Static Public Member Functions

static getAttributeTypeDisplayName ()
static getAttributeTypeDisplayDescription ()
static getModelAttributeAdapterNameForSavingAttributeFormData ()

Data Fields

 $defaultValue = null
 $isAudited = false
 $isRequired = false

Protected Attributes


Detailed Description

Definition at line 37 of file AttributeForm.php.

Member Function Documentation

getModelAttributePartialRule ( )

Returns a partial rule for the attribute being edited by this form. For a rule array('attributeName', 'type', 'type' => 'thetypename'); the method must return array('type', 'type' => 'thetypename') appropriate to its data. For a rule array('attributeName', 'boolean'); the method must return array('boolean'), for example for a checkbox. If the method is not overridden or returns an empty array no rule will be be added to model metadata in regards to the type of the attribute.

Definition at line 158 of file AttributeForm.php.

validateAttributeNameDoesNotExists ( )

Validates that attribute name does not already exist on model. Ignores check if this is an existing attribute being modified since you can't modify the attribute name except during attribute creation.

Definition at line 169 of file AttributeForm.php.

validateIsAttributeNameDatabaseReservedWord ( )

Validates that attribute name is not database reserved word.

Definition at line 186 of file AttributeForm.php.

validateAttributeDoesNotContainReservedCharacters ( )

Validates that attribute name does not contain reserved character sequences

Definition at line 198 of file AttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData ( )

Override if you need to specify a different ModelAttributeAdapterType when saving attributeForm data. This is needed because you can have different logic for calling setting attribute metadata from a form. This allows you to specify an override adapter class.


Definition at line 239 of file AttributeForm.php.

sanitizeFromPostAndSetAttributes (   $values)

Wrapper method to allow any special sanitization to be done on post data prior to setting the attribute values. Override and extend as needed.


Definition at line 249 of file AttributeForm.php.

The documentation for this class was generated from the following file:
Generated on Wed Jun 3 2020 07:10:40