All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Attributes
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 ()
- 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

- Data Fields inherited from AttributeForm
 $defaultValue = null
 $isAudited = false
 $isRequired = false

Protected Attributes

- Protected Attributes inherited from AttributeForm

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.

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.

Definition at line 91 of file DropDownAttributeForm.php.

static getModelAttributeAdapterNameForSavingAttributeFormData ( )
validateCustomFieldDataData (   $attribute,

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.

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

Definition at line 217 of file DropDownAttributeForm.php.

Field Documentation


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.


CustomFieldData model id.

Definition at line 59 of file DropDownAttributeForm.php.

The documentation for this class was generated from the following file:
Generated on Fri Apr 3 2020 07:10:54