function LinkItem::schema

Same name in other branches
  1. 9 core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::schema()
  2. 8.9.x core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::schema()
  3. 11.x core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::schema()

Overrides FieldItemInterface::schema

File

core/modules/link/src/Plugin/Field/FieldType/LinkItem.php, line 64

Class

LinkItem
Plugin implementation of the 'link' field type.

Namespace

Drupal\link\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
        'columns' => [
            'uri' => [
                'description' => 'The URI of the link.',
                'type' => 'varchar',
                'length' => 2048,
            ],
            'title' => [
                'description' => 'The link text.',
                'type' => 'varchar',
                'length' => 255,
            ],
            'options' => [
                'description' => 'Serialized array of options for the link.',
                'type' => 'blob',
                'size' => 'big',
                'serialize' => TRUE,
            ],
        ],
        'indexes' => [
            'uri' => [
                [
                    'uri',
                    30,
                ],
            ],
        ],
    ];
}

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