function SerializedItem::schema

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedItem.php \Drupal\entity_test\Plugin\Field\FieldType\SerializedItem::schema()
  2. 10 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedItem.php \Drupal\entity_test\Plugin\Field\FieldType\SerializedItem::schema()
  3. 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedItem.php \Drupal\entity_test\Plugin\Field\FieldType\SerializedItem::schema()

Overrides FieldItemInterface::schema

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedItem.php, line 36

Class

SerializedItem
Defines the 'serialized_item' entity field type.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
        'columns' => [
            'value' => [
                'type' => 'blob',
                'size' => 'big',
                'serialize' => TRUE,
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.