function DeprecatedReferenceItem::schema

Same name and namespace in other branches
  1. 10 core/modules/jsonapi/tests/modules/jsonapi_test_reference_types/src/Plugin/Field/FieldType/DeprecatedReferenceItem.php \Drupal\jsonapi_test_reference_types\Plugin\Field\FieldType\DeprecatedReferenceItem::schema()

Overrides FieldItemInterface::schema

File

core/modules/jsonapi/tests/modules/jsonapi_test_reference_types/src/Plugin/Field/FieldType/DeprecatedReferenceItem.php, line 41

Class

DeprecatedReferenceItem
Entity reference field type which doesn't implement the standard interface.

Namespace

Drupal\jsonapi_test_reference_types\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    $schema = [
        'columns' => [
            'target_id' => [
                'description' => 'The ID of the target entity.',
                'type' => 'int',
                'unsigned' => TRUE,
            ],
        ],
        'indexes' => [
            'target_id' => [
                'target_id',
            ],
        ],
    ];
    return $schema;
}

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