DropDownDependencyAttributeForm Class Reference

Inheritance diagram for DropDownDependencyAttributeForm:
AttributeForm ConfigurableMetadataModel

Public Member Functions

 __construct (RedBeanModel $model=null, $attributeName=null)
 rules ()
 attributeLabels ()
 getAttributeTypeName ()
 validateAttributeNameDoesNotExists ()
 validateMappingData ($attribute, $params)
 sanitizeFromPostAndSetAttributes ($values)
 getValuesToParentValuesMappedCount ($valuesToParentValues)
 canUpdateAttributeProperty ($propertyName)

Static Public Member Functions

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

Data Fields

 $mappingData = array()

Detailed Description

Form for managing the dependent drop down derived attributes that can be created in the designer tool. An example is if you have 3 dropdowns that need to be connected together so some values in the second dropdown only show based on the value of the first dropdown.

Definition at line 42 of file DropDownDependencyAttributeForm.php.

Member Function Documentation

validateAttributeNameDoesNotExists (  ) 


See also:

Reimplemented from AttributeForm.

Definition at line 126 of file DropDownDependencyAttributeForm.php.

validateMappingData ( attribute,

Make sure the mappings are formed correctly. There are several validation conditions for mapping data. 1. There must be at least 2 attributes mapped to form a dependency. 2. At this time no more than 4 mapped attributes is supported. 3. Any mapped attribute, must have at least one of it's customFieldData values mapped to a parent value, except the top level mapping. 4. Of the values mapped for a given attribute, make sure the mappings are to valid parent values.

string $attribute

Definition at line 151 of file DropDownDependencyAttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData (  )  [static]
sanitizeFromPostAndSetAttributes ( values  ) 

Override to remove any valuesToParentValues where the attributeName is null.

See also:

Reimplemented from AttributeForm.

Definition at line 225 of file DropDownDependencyAttributeForm.php.

getValuesToParentValuesMappedCount ( valuesToParentValues  ) 

Given an array of $valuesToParentValues, ascertain and return the count of how many values are mapped to a parent value.

array $valuesToParentValues

Definition at line 247 of file DropDownDependencyAttributeForm.php.

Field Documentation


The model class name that this drop down dependency is related to.

string $modelClassName

Reimplemented from AttributeForm.

Definition at line 70 of file DropDownDependencyAttributeForm.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Dec 10 07:10:59 2019