function RgbItem::propertyDefinitions
Same name in other branches
- 8.x-1.x field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::propertyDefinitions()
- 4.0.x modules/field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::propertyDefinitions()
Overrides FieldItemInterface::propertyDefinitions
File
-
modules/
field_example/ src/ Plugin/ Field/ FieldType/ RgbItem.php, line 49
Class
- RgbItem
- Plugin implementation of the 'field_example_rgb' field type.
Namespace
Drupal\field_example\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('string')->setLabel(t('Hex value'));
return $properties;
}