public static function Dropdown::propertyDefinitions in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.2 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.3 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.4 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.5 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.6 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.7 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 8.8 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 10.3.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 10.0.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 10.1.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
- 10.2.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::propertyDefinitions()
Defines field item properties.
Properties that are required to constitute a valid, non-empty item should be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired().
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.
Overrides FieldItemInterface::propertyDefinitions
See also
\Drupal\Core\Field\BaseFieldDefinition
File
- modules/
custom/ dropdown/ src/ Plugin/ Field/ FieldType/ Dropdown.php, line 36
Class
- Dropdown
- Plugin implementation of the 'dropdown' field type.
Namespace
Drupal\dropdown\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('string')
->setLabel(t('Text value'))
->addConstraint('Length', [
'max' => 255,
])
->setRequired(TRUE);
return $properties;
}