All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields
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)
 
- Public Member Functions inherited from AttributeForm
 __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 ()
 
- Static Public Member Functions inherited from AttributeForm
static getAttributeTypeDisplayName ()
 
static getAttributeTypeDisplayDescription ()
 
static getModelAttributeAdapterNameForSavingAttributeFormData ()
 

Data Fields

 $id
 
 $mappingData = array()
 
 $modelClassName
 
- Data Fields inherited from AttributeForm
 $attributeName
 
 $attributeLabels
 
 $defaultValue = null
 
 $isAudited = false
 
 $isRequired = false
 

Additional Inherited Members

- Protected Attributes inherited from AttributeForm
 $attributePropertyToDesignerFormAdapter
 
 $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 ( )
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 151 of file DropDownDependencyAttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData ( )
static
sanitizeFromPostAndSetAttributes (   $values)

Override to remove any valuesToParentValues where the attributeName is null.

See Also
AttributeForm::sanitizeFromPostAndSetAttributes()

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.

Parameters
array$valuesToParentValues
Returns
integer

Definition at line 247 of file DropDownDependencyAttributeForm.php.

Field Documentation

$modelClassName

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

Parameters
string$modelClassName

Definition at line 70 of file DropDownDependencyAttributeForm.php.


The documentation for this class was generated from the following file:
Generated on Tue Jan 21 2020 07:10:35