function RgbItem::propertyDefinitions

Same name in other branches
  1. 3.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\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties['value'] = DataDefinition::create('string')->setLabel(t('Hex value'));
    return $properties;
}