DropDownAttributeForm Class Reference

Inheritance diagram for DropDownAttributeForm:
AttributeForm CollectionAttributeFormInterface ConfigurableMetadataModel MultiSelectDropDownAttributeForm RadioDropDownAttributeForm TagCloudAttributeForm

Public Member Functions

 __construct (RedBeanModel $model=null, $attributeName=null)
 getCollectionCountData ()
 getCustomFieldDataId ()
 rules ()
 attributeLabels ()
 getAttributeTypeName ()
 validateCustomFieldDataData ($attribute, $params)
 canUpdateAttributeProperty ($propertyName)
 getModelPluralNameAndAttributeLabelsThatUseCollectionData ()
 validateAttributeNameDoesNotExists ()

Static Public Member Functions

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

Data Fields

 $customFieldDataName
 $customFieldDataData
 $customFieldDataLabels
 $customFieldDataDataExistingValues
 $defaultValueOrder

Protected Attributes

 $customFieldDataId

Detailed Description

Definition at line 37 of file DropDownAttributeForm.php.


Constructor & Destructor Documentation

__construct ( RedBeanModel model = null,
attributeName = null 
)

Override needed to translate defaultValue to the order. Order corresponds to the keyed index of the customFieldDataData array. This is needed for the form to operate correctly in the user interface. Otherwise if you select a default as a new pick list item, the user interface has no way of posting the correct Id for the defaultValue since the new pick list item has not been created yet. Also need override to properly adapt pick list items.

Reimplemented from AttributeForm.

Definition at line 70 of file DropDownAttributeForm.php.


Member Function Documentation

getCollectionCountData (  ) 

Get how many records in a model have each possible customFieldData value selected. If the customFieldData doesn't exist yet, then return 0.

Implements CollectionAttributeFormInterface.

Reimplemented in MultiSelectDropDownAttributeForm.

Definition at line 91 of file DropDownAttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData (  )  [static]
validateCustomFieldDataData ( attribute,
params 
)

Test if there are two picklist values with the same name. This is not allowed. Also make sure there is no comma in the value string.

Definition at line 156 of file DropDownAttributeForm.php.

canUpdateAttributeProperty ( propertyName  ) 

Override to handle defaultValueOrder since the attributePropertyToDesignerFormAdapter does not specifically support this property.

Reimplemented from AttributeForm.

Definition at line 197 of file DropDownAttributeForm.php.

getModelPluralNameAndAttributeLabelsThatUseCollectionData (  ) 

How many attributes that are drop downs across the different models are using this customFieldData.

Implements CollectionAttributeFormInterface.

Definition at line 209 of file DropDownAttributeForm.php.

validateAttributeNameDoesNotExists (  ) 

Override to handle the case when the attributeName was already created used in another module

Reimplemented from AttributeForm.

Definition at line 217 of file DropDownAttributeForm.php.


Field Documentation

$customFieldDataDataExistingValues

Used when changing the value of an existing data item. Coming in from a post, this array will have the old values that can be used to compare against and update the new values accordingly based on any changes.

Definition at line 54 of file DropDownAttributeForm.php.

$customFieldDataId [protected]

CustomFieldData model id.

Definition at line 59 of file DropDownAttributeForm.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Aug 23 07:10:24 2017