function FloatItem::propertyDefinitions
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php \Drupal\Core\Field\Plugin\Field\FieldType\FloatItem::propertyDefinitions()
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php \Drupal\Core\Field\Plugin\Field\FieldType\FloatItem::propertyDefinitions()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php \Drupal\Core\Field\Plugin\Field\FieldType\FloatItem::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
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ FloatItem.php, line 34
Class
- FloatItem
- Defines the 'float' field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('float')->setLabel(t('Float'))
->setRequired(TRUE);
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.