function RgbItem::schema

Same name in other branches
  1. 3.x modules/field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::schema()

Overrides FieldItemInterface::schema

File

modules/field_example/src/Plugin/Field/FieldType/RgbItem.php, line 26

Class

RgbItem
Plugin implementation of the 'field_example_rgb' field type.

Namespace

Drupal\field_example\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
        'columns' => [
            'value' => [
                'type' => 'text',
                'size' => 'tiny',
                'not null' => FALSE,
            ],
        ],
    ];
}