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

 $id
 $mappingData = array()
 $modelClassName

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 (  ) 

(non-PHPdoc)

See also:
AttributeForm::validateAttributeNameDoesNotExists()

Reimplemented from AttributeForm.

Definition at line 126 of file DropDownDependencyAttributeForm.php.

validateMappingData ( attribute,
params 
)

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.

Parameters:
string $attribute
$params 

Definition at line 150 of file DropDownDependencyAttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData (  )  [static]
sanitizeFromPostAndSetAttributes ( values  ) 

Override to remove any valuesToParentValues where the attributeName is null.

See also:
AttributeForm::sanitizeFromPostAndSetAttributes()

Reimplemented from AttributeForm.

Definition at line 224 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.

Parameters:
array $valuesToParentValues
Returns:
integer

Definition at line 246 of file DropDownDependencyAttributeForm.php.


Field Documentation

$modelClassName

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

Parameters:
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 Wed Dec 13 07:10:24 2017